Forum Discussion
Dynamic RLS: propagate to non-security dimensions
- Anonymous5 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.
Sorry for the long reply-time. I think I am on the right track now. I am pretty sure this can be achieved by applying some filter to the "non"-security dimensions. As they share the CompanyId field with the Company table, I assume that something like this filter in the security role would do the trick, beware of pseudo-code:
(NB, User has a physical relation to Company).
Manage Roles:
User ->
Email = USERPRINCIPALNAME()
Department ->
CompanyId = ... TREATAS(VALUES(Company[CompanyId]),Department[CompanyId]) ...
TREATAS because I want to simulate a physical relationship that is not possible between Company and Department tables.
I just can't get the DAX to work...
Dear SumSar
Have you find any solutions. I'm also having same requirement.
Request you to share that file and it will help others like me.
Regards