How to create a rank metric based on metric subtotals in MicroStrategy Developer

The procedure in this document explains how to rank objects based on metric subtotals. Using the MicroStrategy Tutorial project, consider the following report with Subcategory, Item and Revenue:
Users would like to rank based on each Subcategory's subtotal, so that the rank repeats for all the elements or each "Item" in each Subcategory (since the individual items are not being ranked).
To achieve this, follow the steps below:
  1. Create a Revenue metric and for the Dimensionality, remove the Report Level and add Subcategory (Filtering: Standard; Grouping: Standard).
  2. Create a rank metric using the metric created in Step 1 above. Right-click on Rank > Rank Parameters. Choose False for ASC.
  3. Create a report with Subcategory, Item, Rank Metric (created in Step 2) and Revenue. The Revenue metric at Subcategory level created in Step 1 should be placed in the Report Objects window if not needed in the report.
  4. Go to Data > Advanced Sorting. Choose to sort by Revenue in Descending Order. Select the checkbox 'Sort metrics hierarchically using' and select Total. This will sort the revenue metric by Subcategory and place the subcategory that has the highest revenue totals first and so on:
  5. Execute the report and notice that the Revenue metric is sorted in descending order for all the Items per Subcategory. The Subcategory that has the highest subtotal is displayed first and so on. The Rank Metric ranks the Items based on the Revenue subtotals for each subcategory:

Comments

Lavanya said…
I really liked your blog post.Much thanks again. Awesome.
Microstrategy Online Course
Microstrategy Certification