Create Calculated Measures for Tables
In SAP Analytics Cloud, the Calculated Measures calculation creates a new measure (or account) that you can use in your table.
Context
Measures (which are referred to as Accounts in a planning model) are numerical values on which you can use mathematical functions. When setting up your calculation, you’ll apply the typical formula functions, conditions, and operators to the data contained in your model.
Calculated measures allow you to perform mathematical and Boolean operations on your data. For example, you can use a calculated measure to show the effect a sales increase of 20% would have on profits.
-
Choosing a number format that uses periods (.) as decimal separators means that commas (,) must be used to separate function parameters (for example, IF(Condition, ValueIfConditionIsTrue, ValueIfConditionIsFalse)).
-
Choosing a number format that uses commas (,) as decimal separators means that semi-colons (;) must be used to separate function parameters (for example, IF(Condition; ValueIfConditionIsTrue; ValueIfConditionIsFalse)).
If the formula is typed in from scratch, the correct function auto-completion happens based on the user preferences. However, if you copy and paste a full formula string, auto-complete won't be able to adapt if there is a mismatch between separators used and the user preferences.
The following functions, conditions, and operators are available for creating calculated measures. For descriptions of each option, see All Formulas and Calculations.
IF() | POWER() | NOT() |
ABS() | GrandTotal() | TRIM() |
LOG() | %GrandTotal() | FINDINDEX() |
LOG10() | LENGTH() | RIGHT() |
INT() | LIKE() | LEFT() |
FLOAT() | SUBSTRING() | SPLIT() |
DOUBLE() | ISNULL() | ENDSWITH() |
The ISNULL function identifies NULL values, but won't replace a NULL value with a value.
For example, your calculated dimension has the following formula: CD1=IF(ISNULL(D1), "No Value", D1)
The value in cell D1 will not be changed to show the words “No Value”: it will stay as a NULL value.
AND | OR |
> (greater than) | < (less than) |
>= (greater than or equal) | <= (less than or equal) |
= (equal) | != (not equal) |
-
+ (addition)
-
- (subtraction)
-
* (multiplication)
-
/ (division)
In the Calculation Editor, you only see the functions that are valid for your data source.
Procedure
Results
A measure is created based on the formula you entered, and it is added as a new member of the Account or Cross Calculations dimension.
If the formula uses an input control, it will appear on the canvas.
On the canvas, input controls are indicated by the (Formula) icon. If you hover over the icon, all calculations associated with the input control are displayed. By default, the input control is displayed in token mode where input values can be selected from a drop-down list. The input control can be expanded into widget mode, where radio buttons appear beside each value.