MDX在EXCEL透视表的写法

来源:互联网 发布:淘宝相同衣服差了50元 编辑:程序博客网 时间:2024/06/05 23:49

在透视表里,使用MDX ,要注意写法.

 

下面提供几个示例,

Median(                                           (          [DimDate].[CalendarYear].CurrentMember *          [DimDate].[EnglishMonthName].[All].Children         )          , CoalesceEmpty ( [Measures].[Sum of SalesAmount] , 0 )                                 ) 


 

Excel!Quartile(                                 SetToArray (                                                                                                                   ( [DimDate].[CalendarYear].CurrentMember * [DimDate].[EnglishMonthName].[All].Children                                                  )                                  , CoalesceEmpty ( [Measures].[Sum of SalesAmount]  , 0 )                                 )                  ,1) 


 

CUBEVALUE("PowerPivot Data",CUBESET("PowerPivot Data","Head([DimDate].[CalendarYear].[All].Children)"),"[Measures].[Quartile]")


 

Excel!IRR( SetToArray (  [Table3].[b].[All].Children, [Measures].[Sum of a]  ) )


如果掌握了, 非常有用,特别是用于透视表计算.

原创粉丝点击