SYMPTOM:
Users create a compound metric M3, defined as M3=M1/M2. M1 and M2 are metrics that may be simplistically defined as follows:
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)