2011-08-10 115 views
0

Im新的MDX。我正在嘗試執行以下結果。MDX查詢問題

Attended Client Count    Client Count 

---------------------    ----------------- 

723         1223 

我試着這樣做:

WITH MEMBER [Attended Client] AS 
     [Measures].[Client Count] 

SET [Attended Client Set] AS 
FILTER 
(
    [Dim Client Attendance].[Attended].&[Attended], 
    [Measures].[Client Count] <>0 
) 

SELECT {[Measures].[Client Count],[Attended Client] } ON COLUMNS 
FROM [Client Intervention] 

而且它引發我一個錯誤:函數中指定了兩套有不同的維度。我可以一次執行[度量],[客戶計數]或[出席客戶],但不能在一起。任何解決方案?謝謝

回答

1

這是一個link關於一個溫和的MDX介紹,你可以看看元組/集。以下查詢應該做你想做的事:

WITH MEMBER [Measures].[Attended Client Client] AS 
    Aggregate(FILTER ( 
       [Dim Client Attendance].[Attended].&[Attended], 
       [Measures].[Client)Count] <>0 
      ), 
      [Measures].[Client Count] 
) 

SELECT {[Measures].[Attended Client Client],[Measures].[Client Count] } ON COLUMNS 
FROM [Client Intervention]