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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
DevadathanK
Resolver I
Resolver I

Dynamic RLS (Row Level Security) Option

Hello Community!

 

I have a query. Is it possible to for a user to switch RLS ON and OFF in the report? 

The idea is that if the user selects a slicer or button on the report, he/she should be able to switch between the entire data views and data only relevant to them ie. the useer should be able to switch RLS ON and OFF.

 

Is this possible? If it is, please let me know how I should progress. Thanks!

 

I tried giving filters to the table using the IF condition. If toggle is set to ON then use [Email ID] = USERPRINCIPALNAME() etc. but it doesnt seem to work. 

 

Thanks in advance!

2 REPLIES 2
Ale
Resolver II
Resolver II

I would go with the same idea as you had.

 

If toggle is ON, then use [Email ID] = USERPRINCIPALNAME(). If not, then assign a value that will always be true.

 

Did you get any specific error when you did that?

Hey,

 

I couldn't provide the DAX for the toggle table inside the filter for the main RLS Table containing the Email ID.

ToggleID
ON1
OFF2

 

S.No.NameEmail ID
1BobBob@123
2RobinRobin@123

 

In this case the idea is to have an expression like IF [Toggle] = "ON" Then [Email ID] = USERPRINCIPALNAME() Else [S.No.] <> Blank() 

As of now, I'm not able to add the [Toggle] or [Toggle ID] column into the RLS table expression. I'm trying to figure out a way to do that currently. 

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.