Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Team,
I have below model and don't want to show Customer Table If User is not part of Security Table but user should able to slice by other pivots ( Geography). Because Of Default security filtering , It's not working. Can you please tell if there is any workaround.
Scenario : If User is not part of Security Table then don't want to show customer data but user should able to see data by Geography.
RLS Definition On Customer Table:
IF(ISEMPTY(FILTER(VALUES(Secuirty),AND(Secuirty[User Alias] = LEFT(USERPRINCIPALNAME(), FIND("@", USERPRINCIPALNAME()) - 1),Secuirty[Is Authorized User]))),FALSE(),TRUE())
PBI models
Thanks,
Abhiram
In Power BI, you can achieve the desired behavior by modifying your Row-Level Security (RLS) expression. It seems like you want to restrict access to the Customer Table based on whether a user is part of the Security Table, but still allow them to slice the data by Geography. To achieve this, you can use a combination of DAX measures and roles. Here's a step-by-step guide:
Create a New Measure for Geography Slicing: You want users to be able to slice data by Geography regardless of their authorization status. Create a measure that calculates your desired metric for Geography. For example, if you have a Sales measure, create a Geography Sales measure:
Geography Sales = SUM(Customer[Sales])
Modify RLS for Customer Table: Modify your RLS expression on the Customer Table to include a condition that checks if the user is authorized to see data by Geography. You can use a combination of the USERNAME() and USERPRINCIPALNAME() functions to check for authorization.
Here's a modified RLS expression:
IF(
ISEMPTY(FILTER(VALUES(Security), AND(Security[User Alias] = LEFT(USERPRINCIPALNAME(), FIND("@", USERPRINCIPALNAME()) - 1), Security[Is Authorized User]))),
FALSE(),
TRUE()
)
||
HASONEVALUE(Geography[GeographyColumn])
In this expression, we added HASONEVALUE(Geography[GeographyColumn]) to allow users to see data if they are slicing by Geography. If they are authorized for a specific Geography, they will see the data; otherwise, they will see nothing.
Create Roles: Create two roles in Power BI: one for authorized users and one for others.
Assign Users to Roles: Assign users to the appropriate roles based on their authorization status. Users in the "Authorized Users" role will see customer data based on the RLS expression, and users in the "Other Users" role will see data only by Geography.
This approach should allow you to achieve the desired behavior: restricting access to the Customer Table unless the user is authorized while still allowing them to slice the data by Geography.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |