Answered MDX for current user

  • Friday, May 11, 2012 10:28 AM
     
     

    Just trying to work out the mdx for filtering by current logged on user.

    SELECT
    { [Measures].[Contribution] }
    ON COLUMNS,

    { [IFA].[Peak Tier].[Peak Tier].ALLMEMBERS }
    ON ROWS

    FROM [QAP Sales]

    WHERE ( [Account Manager].[Account Manager].[All] )

    Gives me a 'base' selection, now rather than all account managers, I just want the current logged in user. I think MID( Username, InStr (Username, "\") +1) gives my what I'm after, in terms of the user's name that will match with the acount manager's name in the relevant dimension, but I'm not sure how to apply it in the MDX.

    Eventually I'm using this in PerformancePoint, but as a first step I guess I need to understand the actual query that will give me what I want.

All Replies