Forum Discussion
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.
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
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.
8 Replies
- MFelixSuper 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.
- AnonymousNot 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".
Thanks!
- MFelixSuper User
Hi Anonymous
In this case try the following code:
[Account Name] == "COOP Italy" || FIND("- COOP",[Account Name] ,1)- AnonymousNot applicable
Hi MFelix,
Thanks.
Unfortunetly it's not working with this function 😞
I get this error, seems that it didn'r find it although the accounts exist.Thanks!