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

KB5596: Percentage values are not correctly displayed for a compound metric in MicroStrategy Develoer 9.x


Stefan Zepeda

Salesforce Solutions Architect • Strategy


Users create a compound metric M3, defined as M3=M1/M2. M1 and M2 are metrics that may be simplistically defined as follows:M1 = Sum (Fact1), M2 = Sum (Fact2) Users specify that M3 should be displayed as a percentage in MicroStrategy Developer. However, incorrect results are obtained for M3, when a report is run. For instance, if the value for M1 is 5 and the value for M2 is 10, then the value displayed for M3 is 0% rather than 50%. The fractions are not correctly converted to percentages.

SYMPTOM:
Users create a compound metric M3, defined as M3=M1/M2. M1 and M2 are metrics that may be simplistically defined as follows:

  • M1 = Sum (Fact1)
  • M2 = Sum (Fact2)

Users specify that M3 should be displayed as a percentage in Strategy Developer. However, incorrect results are obtained for M3, when a report is run. For instance, if the value for M1 is 5 and the value for M2 is 10, then the value displayed for M3 is 0% rather than 50%. The fractions are not correctly converted to percentages.
 
CAUSE:
A possible cause for this issue is that the metrics M1 and M2 are obtained by summing facts with integer data types. The result (metric M3) is incorrect, due to the fact that an integer-by-integer division is unable to produce a fractional result, on the database side.
 
ACTION:
Multiply the metrics M1 and M2 by 1.01, then divide the entire definition by 1.01 to convert them to Float data type. In other words, define the metric M3 as follows:
M3 = ((Sum(Fact1) *1.01)/1.01)/((Sum(Fact2) *1.01)/1.01)


Comment

0 comments

Details

Knowledge Article

Published:

June 1, 2017

Last Updated:

June 1, 2017