Home > OLAP Calculation Templates > Percent Difference Between ... > Example
![]() Previous |
![]() Next |
This calculated measure computes the percent profit for each Unit as the percent difference between Price and Cost.
Percent difference between measure UNIT_PRICE (...) and measure UNIT_COST (...).
Multiply result by 100.
((PRICE_CUBE.UNIT_PRICE - PRICE_CUBE.UNIT_COST) / ABS(PRICE_CUBE.UNIT_COST)) * 100
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