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

KB42662: How to calculate Percentage to Total in a metric subtotal in MicroStrategy Developer 9.4.x-10.x?


Stefan Zepeda

Salesforce Solutions Architect • Strategy


This knowledge base article documents how to calculate Percentage to Total in a metric subtotal in MicroStrategy Developer 9.4.x-10.x.

In some business scenarios, it is required to calculate the value of Percentage to Total in a metric subtotal, as shown below:

ka02R000000kccQQAQ_0EM440000002CuW.png

For the steps below to achieve the requirement in Tutorial project:

  • In Strategy Developer, create a Subtotal object, and input the expression, as shown below:
ka02R000000kccQQAQ_0EM440000002CuU.png
  • 
    Sum(( x / Sum(x) {} )) {@}


    NOTE: The of the inner Sum() is removed by deleting "@", while the outer one is kept.
  • Save the subtotal object as "Percent to Total".
  • Edit the metric that is required to display the percentage subtotal. Add the subtotal created in the previous steps to the right window to be available for this metric, as shown below:
ka02R000000kccQQAQ_0EM440000002CuS.png
  • Save and close the metric editor.
  • Create a report with attributes and , and metric .
  • Go to Menu -> Data -> Subtotals, and select to enable the new subtotal, as shown below:
ka02R000000kccQQAQ_0EM440000002CuR.png
  • Go to Menu -> Format, to set the format of subtotal values to be Percent, as shown below:
ka02R000000kccQQAQ_0EM440000002CuT.png
  • Save and run the report. The subtotal can calculate the percentage to total, as shown at the top of this technical note.

Comment

0 comments

Details

Knowledge Article

Published:

April 10, 2017

Last Updated:

April 10, 2017