Changing the dimension value as measure

68 Views Asked by At

i want to use the dimension value as calculated measure

case when [time].[month].current member is 
        [time].[month].&[januaray] then 'januaray'

        when [time].[month].&[feb] then 'feburary'
else 'None' end

i want to display for these 12 months values as measures

1

There are 1 best solutions below

1
On

You should be able to use either the property MemberValue, Member_Value, or MemberCaption

So just the following:

[time].[month].currentMember.membervalue

or

[time].[month].currentMember.member_value

or

[time].[month].currentMember.member_Caption

You should not need to do this in mdx:

case when [time].[month].current member is 
        [time].[month].&[januaray] then 'januaray'

        when [time].[month].&[feb] then 'feburary'
else 'None' end

This is equivalent: [time].[month].currentMember.member_Caption. If the reason for the case is to expand feb to feburary then your statement looks ok - I would use NULL instead of the string None and also you need to get rid of the gap for 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