Creating Calculated Dimensions
Create a calculated dimension when you want to concatenate dimensions together, group dimensions, and so on.
You can choose to combine existing dimensions to create your own dimensions.
-
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.
- Concatenated dimension
- Grouped dimension
The following functions, conditions, and operators are available for creating calculated dimensions. For descriptions of each option, see All Formulas and Calculations.
IF() | NOT() | ISNULL() | LIKE() | TOTEXT() | TONUMBER() |
LENGTH() | CONCAT() | SPLIT() | SUBSTRING() | TRIM() | ENDSWITH() |
FINDINDEX() | REPLACE() | LEFT() | RIGHT() | LOWERCASE() | UPPERCASE() |
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)
Use the Calculation Editor to set up your calculated dimension.
-
From a Table: In Builder, under Rows or Columns, select .
From a Chart: In Builder, under Dimensions, select .
-
In the Calculation Editor under Type, select Calculated Dimension.
-
Provide a name for your calculated dimension.
To create a concatenated dimension, do the following:
-
In the Edit Formula area, type your formula.
To concatenate two or more dimensions, use a plus (+) between the values. You can add a space as well:
Example[Product] + " " + [Region] -
To close the Calculation Editor, click OK.
The calculated dimension is ready to be used in your chart or table.
You can choose to create your own member groupings for your data. For example, you may want to group sales from specific cities into North America, Europe, and Other regions. Using the Calculation Editor, create your own If, then, else formula.
-
In the Edit Formula area, type an IF statement with the specific conditions.
ExampleIF ([city] = ("Vancouver", "Duluth", "Tijuana"), "North America", IF ([city] = ("Berlin", "Paris"), "Europe", "Other")) -
To close the Calculation Editor, click OK.
The calculated dimension is ready to be used in your chart or table.