none
MDX to DAX conversion

    Question

  • I need to convert the following MDX query to DAX and I am not able to find an equivalent for the STRTOMEMBER function. Is there any way to do it?
    IIF

    ([Measures].[Activity Impressions] = 0,

    NULL,

    AVG(

    IIF(

    [Time].[Date].

    CURRENTMEMBERIS[Time].[Date].[ALL],

    STRTOMEMBER("[Time].[Date].&["+ FORMAT(NOW(),"yyyyMMdd") + "]").LAG(7):STRTOMEMBER("[Time].[Date].&["+ FORMAT(NOW(),"yyyyMMdd") + "]").LAG(1),

    ([Time].[Date].

    CURRENTMEMBER.LAG(7):[Time].[Date].CURRENTMEMBER.LAG(1))

    ),

    [Measures].[Activity Impressions]

    )

    )

    Also, what about the equivalent for lag function used above?

    Friday, June 13, 2014 6:59 AM

Answers

All replies