Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi community,
Please can someone help as I'm really stuck with dynamic row level security. I had a solution that was working correctly but now isn't and I can't figure out why. I decided to go back to the basics and I can't get this working either. What am I doing wrong? Or is it a bug?
In a new desktop file I have entered data to define the following table:
I created a measure to lookup the current user:
As you can see this works correctly in the report view.
I then defined the row level security role with the same expression as the measure:
But when I view as another user the row level security is applied but the user can not see their own record, so it appears to filter the entire table rather than down to the records that match.
If my understanding is correct the user should see their own record here. The data model only contains the one table, so there are no relationship to propagate filters to other tables.
Please help!
I am using the latest power bi desktop updated from the store.
I also tried disabling and reenabling the enhanced row-level security editor in preview features.
Many thanks
Adam
Solved! Go to Solution.
Hi @AdamGSmith
Have you tried removing the "" around USERPRINCIPLENAME() in your rule? That means you are litterally searching for the string USERPRINCIPLENAME().
Let me know if that works.
Hugh
Hi @AdamGSmith
Have you tried removing the "" around USERPRINCIPLENAME() in your rule? That means you are litterally searching for the string USERPRINCIPLENAME().
Let me know if that works.
Hugh
Thank you so much @HughLa, that's done it.
Now, the question is how did the quotation marks appear?
Well after I created the rule and selected table and column to filter, pbi automatically puts in and expression for you.
I've then typed the function inside the quotation marks, a very silly mistake to make.
Thanks again @HughLa. Hopefully I can fix the other solution now.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
104 | |
69 | |
48 | |
41 | |
34 |
User | Count |
---|---|
164 | |
112 | |
62 | |
54 | |
38 |