The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi,
We are trying to make roles based on different options:
Business is running in several countries and have 3 different business lines (A, B, C). Users, based on their role should be able to see n countries and n business units or all.
Example:
User | Country | Business Unit |
A | ES | A |
A | FR | B |
B | IT | ALL |
C | ES | B |
C | FR | A |
D | ALL | A |
We would like to have a dynamic filter based on the user connected (USERPRINCIPALNAME()) but at the moment we struggle to have the expression correctly to be able to select more than one value.
Could you please help us getting the right expression so if user A connects is able to see countries ES, FR and Business units A and B??
Thanks and kind regards,
Hi @Anonymous,
Based on my research, you need to create a table with user email address and create relationship with your data table, then use the USERNAME() function to filter the RLS data in your Power BI Desktop, you could refer to below blog:
http://radacad.com/dynamic-row-level-security-with-power-bi-made-simple
Regards,
Daniel He
Hi @v-danhe-msft, thanks for your answer.
The problem I see here is that you would need another table with unique values to be able to relate it with the masterdata.
My ideal solution would be to be able to do a dynamic call to the security table where I could get the related restrictions.
Let me know if I need to give further clarification 🙂
Thanks!
@Anonymous, did you find any relevant solution?
Regards
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
95 | |
94 | |
85 | |
69 | |
65 |
User | Count |
---|---|
241 | |
124 | |
121 | |
81 | |
79 |