Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hello everyone.
I would like to add RLS to a PBI file by using one of the source tables as the user list. I have the following tables:
I would like to use the User table to restrict or provide access to the users to some specific countries, meaning that if a user has, let's say, Country Permission = "Germany, United States, Italy", they can ONLY see the information related to those countries.
Can someone help me set this up? (Hope the info above is enough. If not, I can provide some more)
I appreciate your help.
Solved! Go to Solution.
It's resolved! The issue was the DAX function: is not USERNAME(); is USERPRINCIPALNAME().
It would be really nice if there was one location to manage all of this across all reports...
https://ideas.powerbi.com/ideas/idea/?ideaid=e413d9e7-f785-ed11-a76e-281878bd14b2
It's resolved! The issue was the DAX function: is not USERNAME(); is USERPRINCIPALNAME().
Hi @Anonymous ,
Does RLS work for table User (2)? Please make sure the [Username] column is in format. What are the relationships between your tables? Are they Single or Both? If they are Both, make sure "Apply security filter in both directions" is selected.
If these could not work, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.
Refer to:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello @huojiami,
Unfortunately none of the above worked. I used both user tables (in different samples) as the filter table for RLS but neither attempt worked.
I couldn't attach a copy of the file, so I'm sending you prints of the tables, contents, and relationships. I appreciate your help.
Hi @Anonymous ,
Here is my example:
PS: For more details please refer to the attachments
Please try:
First duplicate the user table and then split column:
Output:
Then create relationship:
Then apply the RLS:
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello Jiambo,
So, I tried adding some more data to the tables and replacing the usernames for real ones to test the solution, but unfortunately it didn't work... I don't know if I'm doing something wrong, but this is what I see:
Now, I changed the RLS filter to the "User (2)" table, assuming that was the issue, but still no good result.
Any thoughts on this?
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
14 | |
2 | |
1 | |
1 | |
1 |
User | Count |
---|---|
20 | |
4 | |
4 | |
3 | |
3 |