!--a11y-->
Replacement Path: Replacement with a
Characteristic Value 
A step in the variable wizard that appears for formula and text variables with the processing type Replacement Path.
Text and formula variables with the processing type Replacement Path are replaced by a corresponding characteristic value.
The value of a formula variable has to be a number. The value of a text variable has to be a text.
Here you choose the characteristic or attribute value with which the variable is replaced.
· Key
The variable value is replaced with the characteristic key.
· External Characteristic Value Key
The variable value is replaced with an external value of the characteristic (external/internal conversion).
· Name (Text)
The variable value is replaced with the name of the characteristic.

Note that formula variables have to contain numbers in their names so that the formula variable represents a value after replacement.
· Attribute Value
The variable value is replaced with the value of an attribute. An additional field appears for entering the attribute.
When replacing the variable with an attribute value, you can create a reference to the characteristic for which the variable is defined. Choose the attribute Reference to Characteristic (Constant 1). By choosing this attribute, you can influence the aggregation behavior of calculated key figures and obtain improved performance during calculation. You can find additional information under Properties of the Calculated Key Figure under Aggregational Behavior and under Calculating with Variables for Processing Type “Replacement Path”.

This setting is only available for formula variables.
· Hierarchy Attribute
The variable value is replaced with a value of a hierarchy attribute. An additional field appears for entering the hierarchy attribute.
You need this setting for sign
reversal with hierarchy nodes. For more information, see
Sign
Reversal

This setting is only available for formula variables.
· From-value
· To-value
· Difference
If the replacement value called is an interval, you use this setting to specify whether the lower interval limit (from value) or the upper interval limit (to value) is used as the replacement value.
For formula variable, you can also choose the interval difference as the replacement value. Using this setting, you can easily calculate the difference of period boundaries. The interval difference is the from value minus the to value plus 1. For example, the period January to March gives a result of 3 (the to value 3, minus the from value 1, plus 1)
You use this setting to specify the start and length of the text output.

You want to create a text variable for the fiscal year.
In the replacement path Dialog Box, choose the option Replace Variable with Key and enter the offset start at value 2 and the offset length as 2.
The fiscal year is four digits; the output of the value begins after the second digit and shows 2 digits. Therefore, in the executed query, the text variable for fiscal year 1997 is replaced by the value “97”.
For more examples of the offset start and the offset length, see Variable Replacement Example.

This function is only available for formula variables.
If you select this setting, the formula variable is not replaced by a value (for example, the key value) but gives the existence of a value.
· The value of the variable is 0 when the value to be replaced is a string with only blank spaces or a zero.
· The value of the variable is 1 when the value to be replaced is a string with characters that are not blank spaces or a number does not equal 0.

You want to calculate paid amounts only.
a. In the Replacement Path dialog step, choose the option Replace Variable with an Attribute Value.
b. Enter the attribute Paid. (The master data attribute Paid shows open invoices with a blank space “ “ and paid invoices with the value “X”.)
c. Select Evaluate as Boolean (Value 0 or 1)
For empty spaces you get the a 0 and for the value “X” you get a 1. Multiplication by such a formula variable means that all unpaid amounts are omitted from the query and you are only calculated paid amounts.