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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
brunozanoelo
Post Patron
Post Patron

How to copy/paste RLS from one pbix. to another?

Hello,

How can I copy and paste all the Rules that I have in one .pbix file to another? Every release that I made I need to recreate my RLS into the new .pbix file, this is insane.

Best Regards,
Bruno

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @brunozanoelo ,

In fact, power bi does not limit the role amount of RLS. So for your requirements, you can create different roles and assign roles to your users. 
For instance, you have 10 users and they need to be filtered by their usernames, you need to hard code 10 roles for each user. If you create a dynamic username role, you can use one role on all users. (RLS with username can be used to reduce role amount of similar user roles)

Regards,

Xiaoxin Sheng

View solution in original post

7 REPLIES 7
SimonGravel
Regular Visitor

With the PBIP format, it is now possible to copy and paste from one file to another.

 

  1. Save your Power BI file as .pbip.
  2. Navigate to the folder path:
    YourReport.SemanticModel /definition /roles.
  3. Copy the contents from there and paste them into the same location in your new Power BI report.

 

maryurisar
New Member

Hi, there was any news about this topic? Is possible to copy de rls to another pbix?

parry2k
Super User
Super User

@brunozanoelo I would recommend to create a template file with all RLS rules in it and use template file to start new report so that it contains all the RLS rules.



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.

@parry2k  Hi, I´m already doing this, but I have customers that doesn´t have RLS so every improvement that I make, I need to copy the .PBIX file (and rename him as "WITH RLS") and recreate all my RLS. Is ridiculous, Microsoft should put this on  the service side as it was.

Anonymous
Not applicable

Hi @brunozanoelo ,

In fact, I already try to open pbix file with compression software and review each file but I can't find out correspond files who stored RLS formulas. (I think they may be encrypted or stored in data model which not able to open)

It sounds like your report has lots of RLS roles that are hard to migrate them to a new pbix file.  If this is a case,  I'd like to suggest you set a dynamic user filter based on username function, it should help to reduce RLS role amount. (e.g. simple username mapping to filter related tables or complex filter based on username correspond fields)

RLS with UserName() 

Regards,

Xiaoxin Sheng

@Anonymous  one question:
Some of my customers don´t use RLS, so this idea os RLS using groups will still work for me? Some of my users inside my table should see all the data. This is possible? IF the logon user don´t meet the USERNAME() it will appear all the data from my pbix?

 

Anonymous
Not applicable

HI @brunozanoelo ,

In fact, power bi does not limit the role amount of RLS. So for your requirements, you can create different roles and assign roles to your users. 
For instance, you have 10 users and they need to be filtered by their usernames, you need to hard code 10 roles for each user. If you create a dynamic username role, you can use one role on all users. (RLS with username can be used to reduce role amount of similar user roles)

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.