Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello
I have a table like this
Company | principalName | Data |
company1 | user1 | .. |
company1 | user2 | .. |
company2 | user3 | .. |
company2 | user4 | .. |
Wenn a User (user1 and 2) from Company1 open the report he should see all data from company1.
User (user3 and 4) from company2 will only see Data from company2
principalName is USERPRINCIPALNAME()
How can i write a Filter Dax Expression?
Thanks
Solved! Go to Solution.
Hi @freak ,
It sounds like you need an RLS setup with hierarchy.
You could try using Dynamic Row Level Security with Manager Level Access in Power BI.
The very first step is always identifying who is the person logged into the report in Power BI Service. This can be done with Username() or UserPrincipalName() functions in DAX.
We can use a DAX expression to identify is the person logged in, a manager or not. This can be done with a simple MAXX expression.
For more information,you can refer to:Dynamic Row Level Security with Manager Level Access in Power BI
Hope it helps,
Community Support Team _ Caitlyn
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi @freak ,
It sounds like you need an RLS setup with hierarchy.
You could try using Dynamic Row Level Security with Manager Level Access in Power BI.
The very first step is always identifying who is the person logged into the report in Power BI Service. This can be done with Username() or UserPrincipalName() functions in DAX.
We can use a DAX expression to identify is the person logged in, a manager or not. This can be done with a simple MAXX expression.
For more information,you can refer to:Dynamic Row Level Security with Manager Level Access in Power BI
Hope it helps,
Community Support Team _ Caitlyn
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Yes this works, but i want more 🙂
When i use [principalName] = USERPRINCIPALNAME(), user1 see only data from user1. user1 should see data from company1, as well from user2 but not from user3 and 4
@freak , In role you can add filter
[principalName] = USERPRINCIPALNAME()
Is this expression not working ?
How to use Row Level Security (RLS): https://youtu.be/NfdIA0uS6Nk
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
86 | |
84 | |
66 | |
62 | |
59 |
User | Count |
---|---|
197 | |
116 | |
107 | |
77 | |
70 |