Create calculated members using MDX based on the Bicycle Sales cube.
This example creates new Gross Profit and Gross Profit Margin measures.
Start by creating a connection to the BicycleSales Demo Cube. This cube only has one measure, Value, but several different views of the data, provided by the KeyFigures hierarchy.
To create the calculated measures:
- Open the Manage Calculations box by selecting Anaplan XL > Custom Calculations.
- To create the Gross Profit member, select Insert a new calculated member. A new 'untitled' member appears.
- Fill in these details for the new member.
Name | Gross Profit |
Parent hierarchy | KeyFigures |
Parent member | [KeyFigures].[All] |
Expression | [KeyFigures].[All].&[Revenue] - [KeyFigures].[All].&[Cost of Sales] - [KeyFigures].[All].&[Production Costs] |
- Create a second calculated member for the Gross Profit Margin member, and fill in these details.
Name | Gross Profit Margin |
Parent hierarchy | KeyFigures |
Parent member | [KeyFigures].[All] |
Expression | [KeyFigures].[All].[Gross Profit] / [KeyFigures].[All].&[Revenue] |
Format string | 0% |
- To enter the format string, select Show advanced controls link under the Expressions section.
- There are now members in the KeyFigures hierarchy. If you want to use them as normal measures, create two more members in the Measures hierarchy:
Name | Gross Profit |
Parent hierarchy | Measures |
Parent member | Leave empty |
Expression | ([KeyFigures].[All].[Gross Profit],[Measures].[Value]) |
Name | Gross Profit Margin |
Parent hierarchy | Measures |
Parent member | Leave empty |
Expression | ([KeyFigures].[All].[Gross Profit Margin],[Measures].[Value]) |
Format string | 0% |
- Select OK to create the calculated members.
You can now see the new measures in context. To find badly performing product groups for 2004, follow these steps:
- Select Anaplan XL > Grid.
- Move Measures to columns, Product to rows, and Time to headers.
- Select the Time hierarchy, then select 2004.
- Select the Measures hierarchy to select the Gross Profit and Gross Profit Margin measures.
- Select OK to insert the grid.
When you drill down on the Product hierarchy, you can see that Road S8000 is the failing product.
You can extend this report to use In-cell charts. See Visual grids for performance analysis to continue.