-(负号)(MDX)

执行一元运算,以返回数值表达式的负值。

语法

  
- Numeric_Expression  

参数

Numeric_Expression
返回数值的有效多维表达式 (MDX) 表达式。

返回值

一个具有指定参数的数据类型的负值。

示例

下面的示例演示了此运算符的用法。

-- 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]}  

另请参阅

MDX 运算符参考 (MDX)