Search code examples
ssasmdx

Calculated Member over two date dimensions


I have at current the, calculated member

create member [017SKY_DATAWAREHOUSE].[Measures].[ConversionTest]
as
([Measures].[Lead Count]
,[Origin].[Origin].[Origin Sale Type Description].&[Sky].&[Direct Referral]
,[Misc Flag].[Sale Flag].&[True])
/
([Measures].[Lead Count]
,[Origin].[Origin].[Origin Sale Type Description].&[Sky].&[Direct Referral]),
format_string = "percent"

However I need to numerator of this member to act over one date dimension, and the denominator to act over another date dimension, that is if I cut this Calculated member by date dimension A I need the numerator to be cut by data dimension B.

How do I achieve this?


Solution

  • The function LinkMember is the suitable to do this.

    (
    [Measures].[Lead Count]
    ,[Origin].[Origin].[Origin Sale Type Description].&[Sky].&[Direct Referral]
    LinkMember([Date].[Date].[July 1, 2002], [Date].[Calendar])
    )