Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Multiple Slicer with Row Level Security(userprinicipalName())

Hi Team,

Good day,

I have Two tables

Country table below

CountryStatepopulation
INDIAMaharastra10000
INDIAAP20000
UKABC40000
USCD50000

 

Employee table

EmpNameDep
ShanvithaIT
ABCHR
JohneIT

 

 

Based on above I have created 3 Slicer in Power BI

1.Country

2.State

3.EmpName

 

I have created Below is RLS table because I am using Row Level Security (UserprinicipalName())

EMP_IDEmailCountryStateEmpName
1010Shanvitha.L@abccompany.comINDIAAPShanvitha
1020Johne.J@abccompany.comUSCDJohne

 

I have given relation Country table and RLS table Country column <-->Country column

 

once I will create the Row Level Security in Power BIdesktop(Email=Userprinicipalname()) then view as cheched with Shanvitha.L@abccompany.com its fillter only Country slicer but didnt filter the values(State,EmpName)

 

Please help I need filter Country,State,EmpName slicer in the report using Row Level Security in Power BI

 

Thanks

Shanvitha

 

1 ACCEPTED SOLUTION
v-kkf-msft
Community Support
Community Support

Hi @Anonymous ,

 

Create relationships for columns Country\State\EmpName.

 

image.png

 

Then create role:

 

image.png

[State] = CALCULATE(values('RLS Table'[State]),USERELATIONSHIP('Country table'[State],'RLS Table'[State]))
[Email] = USERPRINCIPALNAME()

 

View as cheched with Shanvitha.L@abccompany.com.

 

image.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-kkf-msft
Community Support
Community Support

Hi @Anonymous ,

 

Create relationships for columns Country\State\EmpName.

 

image.png

 

Then create role:

 

image.png

[State] = CALCULATE(values('RLS Table'[State]),USERELATIONSHIP('Country table'[State],'RLS Table'[State]))
[Email] = USERPRINCIPALNAME()

 

View as cheched with Shanvitha.L@abccompany.com.

 

image.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-kkf-msft,

 

Thanks for the solution, I have same data structure, but more columns to use for RLS, like I have Region, Sub Region, Country, RVP, Site and LOB.
I'm exploring how to implement RLS using above 6 columns, all these columns are coming from one fact table, and I have a RLS Table. Could you please suggest me how to implement RLS using 6 columns.

 

Thanks
Pavan.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.