Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi All,
Im trying to figure out this dynamic RLS problem that i have. I want a simple RLS User table to filter allowed content using USERPRINCIPLENAME().
Example: In the case of a@aaa.com user should be seeing data only related to the following criteria:
Peru/Finland/BU1/BU2/EPC
RLS User Table
Data Table
Anyone has an idea of how to acomplish this?
Thanks in advance for any possible help.
Kr
Hi @Oceans88
If there's relationship exited between RLS User Table and Data table and assuming the related column is A in RLS table, B in Data table, you should specify the related column in the DAX expression such as:
[B] = MAXX(filter(RLS User Table,[Email] = USERPRINCIPALNAME()),[A])
here's also other blogs could be your reference:
https://radacad.com/dynamic-row-level-security-with-manager-level-access-in-power-bi
https://radacad.com/dynamic-row-level-security-with-organizational-hierarchy-power-bi
https://radacad.com/dynamic-row-level-security-with-power-bi-made-simple
Hi v-diye-msft,
Thank you for the link. Greatly apreciated. I have it somewhat working at the moment but i have an issue.
I have 3 diffrent filtering criteria Country/BU/ INL. At the moment each user needs to information for each one of the criterias for RLS to work. If its missing one of the criterias it will show no data for the person.
Example:
User: A@aa.com
User table: Sweden/BU1/EPC
This is working fine.
User: A@aa.com
User table: Sweden/BU1/
Instead of seeing as above, he/she will see nothing because its missing the INL information (EPC)
I have one Role with some code in each of the filtering tables
How can i modify this code to allow it to filter if one of the users is missing one of the 3 requierd criteria ?
Maybe som how :
If(Users[2-BU]=Blank(), Ignore,
CONTAINS (
Users,
Users[Email],
USERPRINCIPALNAME(),
Users[2-BU],
[BU]
)
||
CONTAINS (
Users,
Users[Email],
USERPRINCIPALNAME(),
Users[4-Global],
"Admin")
What do you think?
The model
Just bumping up to see if anyone has any comments on my previous post.
Kind regards
No Ideas, If there is something unclear just let me know and will clarify as best as possible
Hi @Oceans88 ,
Chek if the following thread helps:
https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dynamic-RLS/m-p/1180195
Thanks,
Pragati
Hi Pragati, Thanks for sharing the link. No, i have tried and i can not det it to work. I have seen this post before. Any more ideas on how to accomplish?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
102 | |
84 | |
79 | |
70 |
User | Count |
---|---|
120 | |
110 | |
95 | |
82 | |
77 |