我試圖計算一個具有特定條件的新度量,我先創建了第一級成員,然後試圖在下一個成員定義中使用該度量。MDX計算會員問題
下一個成員「CashDisp」被評估到零。如果一個條件,我是新來的SSAS請幫我解決這個
/*
The CALCULATE command controls the aggregation of leaf cells in the cube.
If the CALCULATE command is deleted or modified, the data within the cube is affected.
You should edit this command only if you manually specify how the cube is aggregated.
*/
CALCULATE;
CREATE MEMBER CURRENTCUBE.[Measures].CashDispensed
AS [Measures].[Orig Trans Amount]/100,
VISIBLE = 1;
CREATE MEMBER CURRENTCUBE.[Measures].CashDisp
AS IIF([Dim Trans Type Code].[Trans Type Code] ='10'
and [Dim Termn Ln].[Termn Ln]= 'PRO1'
and [Dim Reversal Reason].[Reversal Reason] ='00'
and [Dim Trans Response Code].[Trans Response Code] ='051',[Measures].CashDispensed,0),
VISIBLE = 1 ;
您是否需要多維數據集會話的成員或僅用於查詢?嘗試使用'[Measures]。[Orig Trans Amount]/100'作爲第二個成員創建聲明的最後部分。 – michele
我需要這個多維數據集會話,嘗試使用[度量]。[原始傳輸量]/100它仍然返回零,因此想到創建一個新成員繼承信息 – user2385057
另一件事我只注意到立方體瀏覽器有數據時,措施]。[原始轉賬金額]這是此欄的總和,但一旦我拖動計算的成員「cashdisp」[Measures]。[原始轉帳金額]變爲空白,casdisp的值爲零。不確定是否跳閘關係 – user2385057