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 Power BI
I'm sure that there is a tutorial for this type of RLS, I just don't know where to find it
I have the following tables:
User: a list of users (userID unique identificer) including e-mail
Access: A list of users (userID) and which accounts they should have access to. No unique key here necessarily. It will just have user 1, account 1, user 1, account 2, user 1, account 3, user 2, account 1, user 2, account 2 etc. Many users many accounts.
My fact table contains no userID, but contains accountID.
How do I set up RLS, in such a way that the fact table is filtered to the user logging in, and only being able to see their own accounts?
Thanks in advance
@KasperBI , You can have many to Many join on account, user id means email id should be used as filter on this table
In the role
email/userid = userprincipalname()
refer if needed
short video :How to use Row Level Security (RLS): https://youtu.be/NfdIA0uS6Nk
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
Hi @amitchandak
It sort of works.
I have set up 3 tables to test,
1: Contains e-mail from user table
2: Contains e-mail from access table (user and accounts for that user)
3: fact-table, contains account.
There is a 1 to many relationship between table 1 and 2 (user e-mail), and a many to many relationship on account nr. between 2 and 3
When I filter table 1 by clicking on the table, table 2 and 3 filters correctly
When I filter the report page by inserting user email from table 1 into the filter pane table 2 and 3 filters correctly
When I test with RLS [UserEmail]=USERPRINCIPALNAME() table 1 & 2 filters correctly, but not table 3. Table 3 doesn't filter at all this way, even though in my mind I'm applying the exact same filter context in all 3 scenarios. What could be the cause?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
142 | |
79 | |
64 | |
52 | |
46 |
User | Count |
---|---|
213 | |
89 | |
77 | |
66 | |
60 |