Quantcast
Viewing all articles
Browse latest Browse all 217263

RLS not working (totally

I'm working with Power BI August Update and User Accounts in Azure AD, and want to limit access based on login. But it is not all that straight forward. Here's my security model:

 


UserName GroupName

======= ========

UserA        Group1

UserB        Group1

UserC        Group 2 

 

GroupName CustomerNumber
======== =======
Group1        CustomerX

Group1        CustomerY

Group2        CustomerZ

 

 I add these two tables to my model, then relate the first table to the second on GroupName, and the second table to my Customer table on CustomerNumber. Next, I set up a Role in Power BI Desktop model and add the following filter statement under the UserGroup table: [UserName] = USERNAME().

 

It does the filtering properly (filters the LIST of Customers, with their respective sales), but does not filter the TOTAL from the Sales table that is joined to Customer table. Sample table result:


UserName GroupName CustomerNumber TotalSales

====== ======== =========== ======

User1         Group1        CustomerX        $500

User1         Group1        CustomerY        $300

------------------------------------------------------

Total                                                $12,000,000

 

 (Note that the $12,000,000 is the sum total for ALL Customers. )

How do I get this to show the proper $800 ?

 

Thanks in advance


Viewing all articles
Browse latest Browse all 217263

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>