Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi All
I am trying to implement the RLS in power BI. What I want to implement is the security at the country and the clients within the country. If a person belongs to a specific country, he should see the data of that country and the clients within the country he is entiltled to see.
Below is the user access table that I have in PBI. I also have country and client column in the fact table.
Country | Name | Emaild ID | Client |
US | A | emailid1 | ALL |
Germany | A | emailid1 | KLM |
Germany | A | emailid1 | ABC |
US | B | emaild2 | PQR |
Germany | C | emaild3 | HIJ |
Here, if a user 'A' logs on the report, he should see the data related to client 'KLM' and 'ABC' for Germany and he should see data of all the clients for the 'US'.
I tried to implement it with the filter on client and country with AND condition. It works with the scenarions where I dont have 'ALL' for clients.
Any help for this issue is greatly appreciated.
Thanks
Shantanu
Solved! Go to Solution.
Thanks for the reply from AmiraBedh , please allow me to provide another insight:
Hi @Shantanu3006 ,
Here are the steps you can follow:
1. Modeling – Manage Roles – Filter data -- Place the following formula .
When applying to multiple users, you can replace "A" with USERPRINCIPALNAME().
var _table1=
FILTER('Table','Table'[Name]="A")
var _Country=
SELECTCOLUMNS(_table1,"Country",[Country])
var _Email=
SELECTCOLUMNS(_table1,"email",[Emaild ID])
RETURN
IF(
[Emaild ID] in _Email || [Country] in _Country,TRUE(),FALSE())
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thanks for the reply from AmiraBedh , please allow me to provide another insight:
Hi @Shantanu3006 ,
Here are the steps you can follow:
1. Modeling – Manage Roles – Filter data -- Place the following formula .
When applying to multiple users, you can replace "A" with USERPRINCIPALNAME().
var _table1=
FILTER('Table','Table'[Name]="A")
var _Country=
SELECTCOLUMNS(_table1,"Country",[Country])
var _Email=
SELECTCOLUMNS(_table1,"email",[Emaild ID])
RETURN
IF(
[Emaild ID] in _Email || [Country] in _Country,TRUE(),FALSE())
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Why do you have the country and client columns in the fact table if the country already belongs to the client dimension ?
Can you share the design of your data model ?
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
78 | |
76 | |
53 | |
37 | |
31 |
User | Count |
---|---|
101 | |
56 | |
51 | |
45 | |
40 |