EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB11716: How to create a rank metric based on metric subtotals in MicroStrategy Developer 9.x and 10.x


Stefan Zepeda

Salesforce Solutions Architect • Strategy


KB11716: How to create a rank metric based on metric subtotals in MicroStrategy Developer 9.x and 10.x

The procedure in this document explains how to rank objects based on metric subtotals. Using the Strategy Tutorial project, consider the following report with Subcategory, Item and Revenue:

ka02R000000kbg0QAA_0EM440000002Fkt.jpeg

 
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:

  • Create a Revenue metric and for the Dimensionality, remove the Report Level and add Subcategory (Filtering: Standard; Grouping: Standard).
  • Create a rank metric using the metric created in Step 1 above. Right-click on Rank > Rank Parameters. Choose False for ASC.
  • 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.
  • 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:
ka02R000000kbg0QAA_0EM440000002Fkv.jpeg
  • 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:
ka02R000000kbg0QAA_0EM440000002Fkz.jpeg

Comment

0 comments

Details

Knowledge Article

Published:

June 12, 2017

Last Updated:

June 12, 2017