我想使用维度值作为计算量度
case when [time].[month].current member is
[time].[month].&[januaray] then 'januaray'
when [time].[month].&[feb] then 'feburary'
else 'None' end
我想将这 12 个月的值显示为度量
您应该能够使用属性MemberValue,Member_Value或MemberCaption
所以只有以下内容:
[time].[month].currentMember.membervalue
或者
[time].[month].currentMember.member_value
或者
[time].[month].currentMember.member_Caption
您不需要在以下位置执行此操作mdx:
case when [time].[month].current member is
[time].[month].&[januaray] then 'januaray'
when [time].[month].&[feb] then 'feburary'
else 'None' end
这是等价的:[time].[month].currentMember.member_Caption. 如果原因case是扩展feb为,feburary那么您的语句看起来还可以 - 我将使用NULL字符串 None 代替,您还需要消除以下差距CurrentMember:
CASE
WHEN ([time].[month].currentmember IS [time].[month].&[januaray]) THEN 'januaray'
WHEN ([time].[month].currentmember IS [time].[month].&[feb]) THEN 'feburary'
when [time].[month].&[feb] then 'feburary'
ELSE NULL END