Export (0) Print
Expand All

- (Subtract) (MDX)

Performs an arithmetic operation that subtracts one number from another number.

Numeric_Expression-Numeric_Expression

Numeric_Expression

A valid Multidimensional Expressions (MDX) expression that returns a numeric value.

A value with the data type of the parameter that has the higher precedence.

Both expressions must be of the same data type, or one expression must be able to be implicitly converted to the data type of the other expression. If one expression evaluates to a null value, the operator returns the result of the non-null expression.

The following example demonstrates the use of this operator.

-- This member returns the increase or decrease
-- in gross profit margin over a month.
WITH MEMBER [Measures].[GPM Delta] AS
 (
(Measures.[Gross Profit Margin]) - 
([Date].[Calendar].CurrentMember.PrevMember, 
Measures.[Gross Profit Margin])
  ), FORMAT_STRING = 'Percent'

SELECT 
DESCENDANTS(
[Date].[Calendar].[Calendar Year].&[2002], 
[Date].[Calendar].[Month]) ON 0,
[Product].[Category].[Category].Members ON 1
FROM
[Adventure Works]
WHERE
([Measures].[GPM Delta])

Community Additions

ADD
Show:
© 2014 Microsoft