Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.
Hello to the forum,
I have the following table "Sales":
The sales come from different regions.
As you can see, sales are generated either in the "North" region or in the "South" region.
But there are people who are only allowed to see sales from either North or South or from both regions.
I recorded these conditions in the “Accounts” table:
The "Accounts" table shows who can see sales from which regions
The challenge is that the user "Charlie" is allowed to see sales from all regions.
I would like to define a role that, depending on the email address in the "Account" column, only shows the logged-in Power BI user the sales intended for him.
Do you have an idea how I can realize this?
Can you help me?
Greetings
Solved! Go to Solution.
Hi @Jan_Trummel ,
According to your description,here's my solution. Use Row-level security (RLS) like this:
1.Click Home>Manage roles.
2.Add a new role, filter the Account column in Accounts table:
[Account] = USERPRINCIPALNAME()
3.Filter the Location column in Sales table:
SWITCH (
MAXX (
FILTER ( 'Accounts', 'Accounts'[Account] = USERPRINCIPALNAME () ),
'Accounts'[Location]
),
"North", [Location] = "North",
"South", [Location] = "South",
"ALL", [Location] IN { "South", "North" }
)
Get the correct result:
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Jan_Trummel ,
According to your description,here's my solution. Use Row-level security (RLS) like this:
1.Click Home>Manage roles.
2.Add a new role, filter the Account column in Accounts table:
[Account] = USERPRINCIPALNAME()
3.Filter the Location column in Sales table:
SWITCH (
MAXX (
FILTER ( 'Accounts', 'Accounts'[Account] = USERPRINCIPALNAME () ),
'Accounts'[Location]
),
"North", [Location] = "North",
"South", [Location] = "South",
"ALL", [Location] IN { "South", "North" }
)
Get the correct result:
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
76 | |
75 | |
69 | |
47 | |
41 |
User | Count |
---|---|
62 | |
39 | |
32 | |
30 | |
28 |