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

KB8472: What is Smart Totaling in MicroStrategy?


Community Admin

• Strategy


The smart metric property of a compound metric allows the user to change the default evaluation order of the metric. Smart metrics calculate subtotals on individual elements of the compound metric. To toggle smart metrics on and off, use the checkbox (Allow Smart Metric) at the bottom of the Subtotals/Aggregation tab in the Metric Editor.
 
For example, consider a metric defined to calculate profit margins. Profit Margin can be defined as the difference between Sales and Cost divided by Cost (to show the percentage return on the investments made). These metrics can be created in Strategy Agent as follows: 
<<Sales>>: SUM (SALES_FACT)
<<Cost>>: SUM (COST_FACT)
Profit Margin: (<<Sales>>- <<Cost>>)/<<Cost>>
Consider the following example values for Sales and Cost. 
Example 1:
<<Sales>>=4
<<Cost>>=3
Profit Margin = (4-3)/3 which equals 0.33 (or 33%).
 
Example 2:
<<Sales>>=6
<<Cost>>=5
Profit Margin = (6-5)/5 which equals 0.20 (or 20%).
 
Example 3:
<<Sales>>=6
<<Cost>>=4
Profit Margin = (6-4)/4 which equals 0.50 (or 50%).
 
With the Allow Smart Metric setting not enabled for Profit Margin, the Strategy SQL Generation Engine simply adds up the individual values for Profit Margin and calculates the total as 1.03 (or 103%). This value is not desired for the total as it does not represent the metric calculation from the base values.
 
However, with the Allow Smart Metric setting enabled for Profit Margin, the grand total for Profit Margin is calculated using the metric formula for Profit Margin and replacing each of the simple metrics in the formula by their sum. This preserves the non-linearity of Profit Margin rather than simply summing up the results of each instance of the metric in the report. For the above example, the total for Profit Margin is calculated as: 
(SUM(<<Sales>>)- SUM(<<Cost>>))/SUM(<<Cost>>)
This calculation gives a total of (16-12)/12 which is 0.33 (or 33%) and not 103% as calculated without enabling smart totaling.
 


Comment

0 comments

Details

Knowledge Article

Published:

May 10, 2017

Last Updated:

May 10, 2017