Error in Calculated Measures in SSAS 2008

  • I have been getting error for the below calculated measure.

    CREATE MEMBER CREATECUBE.[Measures].WOP

    AS

    CASE

    WHEN ([Month].[Year].members >= "2011")

    then [Measures].[M1]

    else [Measure].[M2]

    end,

    Visible=1;

    Scenario - When the year is <=2011, measure1 should get displayed else measure2.

    when I hardcode the year ([Month].[Year].&[2011]), it works

    Could anyone please help me on this or provide better solution?

    Thanks in advance!!

  • This is not going to work... "2011" can not just be compared to members like that. Maybe lookup the filter function or the instr function.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply