2011-08-10 20 views
0

新しいMDXクエリには、各行に出席率のパーセンテージを追加しようとしています。次のコード:MDXでのパーセント計算

SELECT {[Measures].[Client Interventions Count]* [Dim Intervention Attendance].[Attended].Children} ON COLUMNS, 
[Dim Date].[Calendar].[Month Name] ON ROWS 
FROM [Client Intervention] 

procudeの結果:

enter image description here

がどのように私は、各行の計算を実行することができますか?たとえば、2007年11月の最初の行では、クライアントの総介入件数= 68であるため、割合は57/68%になります。

ありがとう

答えて

0

計算されたメンバーを使用してください - あなたはいくつかの例を見つけることができますhere

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 

]

:クエリのためのアイデアは以下の通りです
関連する問題