Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Dynamic RLS: propagate to non-security dimensions

Hi. I have been struggling finding a good solution to a very common RLS-problem for awhile. I will try to explain it here with a simple example:   My data model contains the following tables:   D...
  • Anonymous's avatar
    Anonymous
    5 years ago

    The answer was very simple after all... This piece of beauty did the trick:

     

    [CustomerID] =
    CALCULATE (
    MAX ( User[CustomerID] ),
    FILTER ( User, User[UserEmail] = USERPRINCIPALNAME () )
    )

     

    This code needs to be applied to all Dimensions in my security role for which I only want to see lines relevant to Customer XXX

     

    Hope this can help others too.