我正在尝试计算具有某些条件的新度量,我首先创建了一个第一级成员,然后尝试在下一个成员定义中使用它。
下一个成员“CashDisp”在 If 条件下评估为零,我是 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 ;