How to Use Measure-Based Dimensions in SAP Analytics Cloud
Measure-based dimensions are a very useful tool to do complex analysis which requires you to create additional dimensions. Let’s check out how to use them.
In this example we will create a dimension that categorizes the sales managers of a company into different performance categories based on the revenue they generated, like in the chart below.
As the name says, at the base of a “measure-based dimension” is a measure, which is used to derive dimension values.
To create a new dimension, go to the builder panel of a chart and click on “Add Dimension” and then “Add Calculated Dimension”. In the pop-up you have the option to select the “Measure-Based Dimension”.
Now we select the base measure which in our case will be the sales revenue and name the future dimension. We will call it Sales Manager Performance.
You have the choice of using the measure values as the dimension values, which will be useful for numeric dimensions. For example, if you are looking at the measure “Discount” and you want to create a dimension that indicates the rounded discount. In this case you would check “Use measure values as dimension members” and define scale and decimal places (green box above).
In our case however, this would not be useful. We need to define strings that we assign to value ranges of our measure.
In our example we are going to define three dimension values with the following ranges:
In a second step you need to specify the dimension context. It defines how to (dis)aggregate your measure based on the dimension(s) you specify. In our case we want the dimension to create a classification based on the sales manager’s overall sales revenue. Therefore, we specify the sales manager dimension in the dimension context as you can see in the screenshot above.
The basis for your measure-based dimension would be this aggregation state. In the table below you also already see the assigned dimension member.
As a last step you can define the filter context. By default, the calculated dimension looks at the entire data set. In order to change that behavior, you can add a static filter or a dynamic one that can be adapted in view time through an input control.
For example, let’s say that you want to classify the sales managers performance only on their sales revenue in 2019. We therefore add a fix filter on 2019 in the filter context of our measure-based dimension.
If you now look at the classification of sales managers in a table, you can see the classification has changed based on the Sales Revenue for 2019.
Alternatively, you can also use an input control to define the filter applied to the classification during view time. Then the end user can specify based on what time frame the sales manager should be classified.
In the story the input control will be displayed in the story and can change the behavior of the measure-based dimension.
Impact of Filters on Measure-Based Dimension
Please note that story, page and tile filters have no impact on the classification in the measure-based dimension. The measure-based dimension is always calculated on the base of the selected measure and the defined dimension and filter context only.
What does this mean exactly? Let us assume you have defined the “Sales Manager Performance” based on the measure sales revenue with the dimension sales manager in the dimension context and no filter context defined. That means the classification per sales manager would be done for the whole data set with the result we already saw before:
In this example, let us add a story filter on the year 2018. The sales revenue gets filtered to 2018, but the classification remains unchanged as the measure-based dimension looks at the entire time frame.
Are you using measure-based dimensions and have questions or feedback? Please share your thoughts in the comments!