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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
AUaero
Responsive Resident
Responsive Resident

Enable/Disable RLS by report

Hi,
Here's the background:  We've implemented a split backend/frontend model in the PBI service where data models live in one workspace and the live connection reports to those data models live in various other workspaces.  We've also implement RLS on our sales model to control access to data at the sales person, sales manager, and general manager roles.
However, we've got some reporting that a person at the lowest security role (a salesperson) needs to see data for the entire company.  For example, we publish daily rankings of salesperson performance where each salesperson is ranked against all other salespeople.  If RLS is enabled for this report, the salesperson will only be ranked against himself since RLS will filter out data for all other salespeople.

Our solution to this problem has been to create two separate data models - one that has RLS and one that does not.  Reports that need to be controlled by salesperson are built from the RLS model while others such as the salesperson ranking are built from the non-RLS model.

This works but isn't ideal.  We have to maintain two versions of the data model and any changes have to be implemented twice to keep both models up to date.

Is there a way to create a data model that can toggle RLS on/off for a specific report?  I tried creating something in the model using a disconnected table and slicer to capture "RLS on" or "RLS off", but I can't see any way to use SELECTEDVALUE in the context of a RLS dax filter on the user table.

Any thoughts or suggestions would be most welcome.

Thanks!

8 REPLIES 8
the_machine_11
Frequent Visitor

I'm stuck with this as well, can't get the RLS working in 1 report but not the other. Could you share more details on the disconected table solution?

v-xiaotang
Community Support
Community Support

Hi @AUaero 

Have you solved this problem? If yes, could you kindly accept the answer helpful as the solution (or kindly share your solution ). so the others can find it more quickly.
really appreciate!
Any question, please let me know. Looking forward to receiving your reply.


Best Regards,
Community Support Team _Tang

v-xiaotang
Community Support
Community Support

Hi @AUaero 

what's your datasource? personally speaking, if you can depoly on-premise datasource, then create 2 reports with the datasource, after the reports uploaded to Service, one report's dataset set RLS, and another one for salesperson is non-RLS. then you only need to maintain the on-premise datasource.

 

Best Regards,

Community Support Team _Tang

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

parry2k
Super User
Super User

@AUaero Seems like you are on the right track if you have disconnected table and with the selection, you can force the RLS rules, not sure why it wouldn't work.

 

Can you share what DAX expression you are using for RLS?

 

Follow us on LinkedIn

 

Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

AUaero
Responsive Resident
Responsive Resident

Thanks @Greg_Deckler - I had this thought as well and for some things (like my ranking example) I think it could work fine.  Still, it would be nice to just turn RLS on/off so that we retain the maximum flexibility when designing the reports.

@AUaero You'd probably have to submit this as an Idea if it is not already there. Actually, did you just do that? Microsoft Idea  · Enable/Disable RLS at the Report Level for Reports With Shared Data Models (powerb...

 

I voted for it! Not sure if it is exactly possible and seems like a potential big security risk actually so not sure it would ever be implemented.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

LOL @Greg_Deckler thanks for voting.

I agree, it *could* be a security risk, but I wish enterprise software would trust users a little more.  As in, throw a great big warning box on there that says, "hey dummy, if you turn this on we aren't responsible if you share data that you shouldn't have."  I can decide whether I want the risk or not.  😁

Greg_Deckler
Community Champion
Community Champion

@AUaero Typically the way I have seen this handled is to create an "aggregation table" that summarizes the information in the report. This is done as a DAX calculated table and no RLS is applied to it. Then you have a single data model.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.