开发者

Percentage Calculation on MDX

Im new to MDX Query and I'm trying to add a percentage on attended percentage in each row. The following code :

SELECT {[Measures].[Client Interventions Count]* [Dim Intervention Attendance].[Attended].Children} ON COLUMNS,
[Dim Date].[Calendar].[Month Name] ON ROWS
FRO开发者_如何学运维M [Client Intervention]

procude a result of :

Percentage Calculation on MDX

How can I perform a calculation on each row? For example, first row November 2007 , total client intervention count = 68 , so the percentage count should be 57/68 %

Any idea?? Thanks


Use a calculated member - you can find several examples here. The idea for the query is as following:

WITH MEMBER [Dim Intervention Attendance].[Attended].[%] AS
    ( [Dim Intervention Attendance].[Attended].[Attented],
       [Measures].[Client Interventions Count] )
  / ( [Dim Intervention Attendance].[Attended].[Not Attented], 
      [Measures].[Client Interventions Count] )

SELECT  
  [Measures].[Client Interventions Count] 
   * { [Dim Intervention Attendance].[Attended].[%], 
       [Dim Intervention Attendance].[Attended].Children } ON COLUMNS,

  [Dim Date].[Calendar].[Month Name] ON ROWS

FROM [Client Intervention

]

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜