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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Restrict data access from master rerport

Hi,

 

We created in Power BI a usage report that analyzes all our product usage data. The data contains multiple customers, users, events, etc. The master report will include all the customers and is designed for stakeholders (they want to see all the data for all customers). But, this report is also used by our customers, specific users from the customer have access to view their account usage data.

 

TalV_1-1699275715296.png

 

TalV_0-1699275698009.png

 

Today, we are creating reports using a dummy method. We duplicate the master file, and then in the query we filter just the relevant customers (customer name contains "XXX") and publish it to a dedicated workspace for each account.

We have a few databases in the model (some are connected and some are not) and we filter the names in all of them.

In this method, every change we make to the master report must be manually applied to all other reports as well, and we have a lot of customers already, so we would like to make the process more efficient.

 

I've read about Row-level security (RLS). Is this a good solution to make this process more efficient? Or is there another way you can suggest?

 

Thanks

Tal

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

Try the following code:

([Account Name] == "Super Pharm IL" || FIND("- SPIL",[Account Name] ,1, FALSE()) > 0 ) && LEFT([Account Name] , 3) <> "NIQ"

Don't forget to accept the correct answer so it can help others.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

8 REPLIES 8
Anonymous
Not applicable

Thanks @MFelix.

 

 I tried using RLS, but I'm not sure which DAX function I need to write. I need to filter: Account name equals "COOP Italy" OR Account name contains "- COOP".

 

TalV_0-1700380894878.png

 

Thanks! 

 

Hi @Anonymous 

 

In this case try the following code:

[Account Name] == "COOP Italy" || FIND("- COOP",[Account Name] ,1)

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

Hi @MFelix,

 

Thanks.

Unfortunetly it's not working with this function 😞 

 

TalV_1-1700648471570.png
I get this error, seems that it didn'r find it although the accounts exist. 

 

TalV_0-1700648413839.png

TalV_3-1700648606931.png

 

 

 

Thanks!

 

 

Redo the calculation to:

 

[Account Name] == "COOP Italy" || FIND("- COOP",[Account Name] ,1, FALSE()) > 0

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

Hi @MFelix,

 

Thank you so much, it is working now!
One more question, If I want to add to this DAX function -->
Account name not contains "NIQ - ", what should I add? 

It's from a different RLS role but it's because I want to not include the internal accounts start with NIQ. 


[Account Name] == "Super Pharm IL" || FIND("- SPIL",[Account Name] ,1, FALSE()) > 0

 

TalV_1-1700744991833.png

 

Thank you so much!



Hi @Anonymous ,

 

Try the following code:

([Account Name] == "Super Pharm IL" || FIND("- SPIL",[Account Name] ,1, FALSE()) > 0 ) && LEFT([Account Name] , 3) <> "NIQ"

Don't forget to accept the correct answer so it can help others.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

Perfect! Thanks @MFelix 

 

MFelix
Super User
Super User

Hi @Anonymous ,

 

The RLS is the best option because you can link specific information to specific user groups, in this case you would need to have a table that would relate the username (needs to be the emails for Power BI login) with the customer table, that way when the user logins to the Power BI will only access is information.

 

Check this blog post wiht a full explanation.

 

https://www.fourmoo.com/2016/10/03/power-bi-dynamic-row-level-security-things-you-need-to-know-to-get-it-working/

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors