Skip to content

Latest commit

 

History

History
53 lines (41 loc) · 1.17 KB

negative-mdx.md

File metadata and controls

53 lines (41 loc) · 1.17 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic ms.custom
- (Negative) (MDX)
- (Negative) (MDX)
kfollis
kfollis
kfollis
02/17/2022
sql
analysis-services
reference
mdx

- (Negative) (MDX)

Performs a unary operation that returns the negative value of a numeric expression.

Syntax

  
- Numeric_Expression  

Parameters

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

Return Value

A negative value that has the data type of the specified parameter.

Examples

The following example demonstrates the use of this operator.

-- This member creates a negative version of the  
-- Reseller Freight Cost.  
WITH MEMBER   
   Measures.[Resell Cost as Negative]   
   AS -Measures.[Reseller Freight Cost]  
SELECT   
   [Date].[Calendar Month of Year].Children ON COLUMNS,  
   [Product].[Product Categories].Children ON ROWS  
FROM  
    [Adventure Works]  
WHERE  
    {[Measures].[Resell Cost as Negative]}  

See Also

MDX Operator Reference (MDX)