Skip Headers
Previous
Previous
 
Next
Next

Percent Difference

Calculates the percent difference between the values of two measures. Multiplying this fraction by 100 generates the percentage.

Template

Percent difference between measure measure (...) and measure measure (...).

Multiply result by 100.

Example

This calculated measure computes the percent profit for each Unit as the percent difference between Price and Cost.

Calculation

Percent difference between measure UNIT_PRICE (...) and measure UNIT_COST (...).

Multiply result by 100.

OLAP Expression Syntax

((PRICE_CUBE.UNIT_PRICE - PRICE_CUBE.UNIT_COST) / ABS(PRICE_CUBE.UNIT_COST)) * 100

Query Results

The Pct Profit column shows the percent difference between price and cost for personal computers. A Subtraction calculation computes the values of the Profit column.

Product              Price  Cost  Profit Pct Profit
-------------------- ----- ----- ------- ----------
Envoy Ambassador      2892  2664     228       8.55
Envoy Executive       2803  2644     160       6.04
Envoy Standard        1662  1737     -76      -4.35
Sentinel Financial    1755  1658      97       5.82
Sentinel Multimedia   1770  1813     -43      -2.38
Sentinel Standard     1552  1410     142      10.09