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.
Anonymous , refer if this can help
RLS - Row Level security
https://community.powerbi.com/t5/MBAS-Gallery/Microsoft-Power-BI-Unleash-row-level-security-patterns-in-Power/td-p/712613
https://radacad.com/dynamic-row-level-security-with-organizational-hierarchy-power-bi
https://www.blue-granite.com/blog/using-dynamic-row-level-security-with-organizational-hierarchies
https://docs.microsoft.com/en-us/power-bi/service-admin-rls
https://blog.tallan.com/2018/04/10/row-level-security-in-power-bi-part-1-roles-and-users/
https://radacad.com/what-do-you-need-to-implement-dynamic-row-level-security-in-power-bi
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...
- vasathi5 years agoHelper II
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