Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi All,
We are fairly new to Power BI so please bear with us as after hours of searching we cannot find a solution to our requirement.
We want to build reports that we can push out to our customers based on a single dataset restricted by RLS. We are exporting the data from our ERP application and importing it into Power BI. Every table we import contains the CompanyID (or you can think of this as a tenantid).
We have a users table that contains the users and the CompanyID they can access - in some cases, some users can access multiple companies so we add a row for each user/companyID combination. We link this to the companies table which contains one row per company mapping the ID to the company name.
Relationship is set up as bi-directions with Apply Security Filter in Both Directions.
We then apply D-RLS to the Users table based on UserPrincipalName() ie [Username] = USERPRINCIPALNAME().
So far, so good.
We then have four other tables - one containing a list of sales invoices, one containing the customer masterfiles, and two containing the sales rep masterfiles (one to map to the account manager on the customer, and one to map to the sales rep that processed each sale). All tables contain a column for the CompanyID. In order for a user to select an Account Manager in a slicer to filter the list of customers they can see and the list of sales made to those customers, we need to link as follows.
All relationships show as Many-to-Many due to the same sales rep code or customer code appearing in the dataset for different companies/tenants. This makes sense - not ideal but makes sense.
The problem we now face is how to apply the User/Company Access security to the report. In order to ensure a user only sees a list of the Account Managers, Customers and Invoices that apply to the Companies they have access to, we have tried:
#3 looks like the winner so far, however this presents the next problem. Lets say a user logs in with access to two companies but they want to filter down to just view a single company's data today.
So we are now at a loss of what else to try.
Even if we split each of our clients into their own workspace with their own data set, some clients have multiple companies that they may want to see in aggregate or seperately so we will still have the same problem.
Can anyone provide any guidance on how to proceed or if we have got this wildly wrong from the start?
Hi Jay,
To simplify the problem, see below.
All tables need to filter by the company the user selects in our 'Company Selection' slicer so that the slicers in the report for Customer Group, Sales Rep and Market Code only show entries valid for that selected company. I then need to be able to filter my customers by Customer Group, Sales Rep or Market Code using slicers. I cannot enable the inactive relationships because:
If I remove the link between Companies and Customers, then I can only enable one of the links between Customers and Customer Groups, Sales Reps or Market Codes before I get a similar message.
In this case, RLS is not an option as the user has access to multiple companies but may want to drill down into a data for a single company.
Hope this makes more sense.
Chris
Hi @bbsoftware ,
Have trouble to follow. Would you please share some sample so that we could do some test?
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 36 | |
| 34 | |
| 31 | |
| 27 |
| User | Count |
|---|---|
| 136 | |
| 103 | |
| 66 | |
| 65 | |
| 56 |