Skip Headers
Previous
Previous
 
Next
Next

Subtraction

Calculates the difference between the values of two measures.

Template

Subtract measure measure (...) from measure measure (...).

Example

This calculated measure computes the difference between Price and Cost.

Calculation

Subtract measure UNIT_COST (...) from measure UNIT_PRICE (...).

OLAP Expression Syntax

PRICE_CUBE.UNIT_PRICE - PRICE_CUBE.UNIT_COST

Query Results

The Profit column shows the percent difference between price and cost for personal computers.

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