Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
I am hoping someone can help me with Dynamic RLS, I work for a Pharmacy group at the Head Office Level and have been tasked with setting up Power BI for our Company. The Data that I need to restrict will be from different columns, For Example:
Head Office Staff - Can See ALL Stores
Corporate Store Owner - Can see All Corporate Stores (Not Franchisee stores)
Pharmacist Manager - Can only see the Store/Stores they Manage
Sales Assistant - Can only see the store they work in
My Store Data has 3 Columns that the RLS could be filtered by Pharmacy Type, Pharmacy Group, LocationID or LocationCode
Corporate | Group4 | 801 | Location_801 |
Corporate | Group9 | 802 | Location_802 |
Corporate | Group3 | 803 | Location_803 |
Corporate | Group1 | 804 | Location_804 |
Corporate | Group7 | 805 | Location_805 |
Corporate | Group3 | 811 | Location_811 |
Corporate | Group5 | 812 | Location_812 |
Corporate | Group10 | 816 | Location_816 |
I have looked at a heap of different examples but I can't seem to find an example where I can see how I would even go about structuring or setting this up.
I have created a sample Data File which may help explain what I am trying to do.
I am quite new to Power BI so any help/advice would be greatly appreciated.
Solved! Go to Solution.
Hi , @NAV_81
You may need to use USERNAME()/USERPRINCIPALNAME() function to implement dynamic row level security .
Please check if the workaround as described in this thread helps.
https://community.powerbi.com/t5/Desktop/DAX-Code-for-Dynamic-RLS/td-p/807960
Best Regards,
Community Support Team _ Eason
@NAV_81 . refer if these can help for RLS
https://community.powerbi.com/t5/MBAS-Gallery/Microsoft-Power-BI-Unleash-row-level-security-patterns...
https://radacad.com/dynamic-row-level-security-with-organizational-hierarchy-power-bi
https://www.blue-granite.com/blog/using-dynamic-row-level-security-with-organizational-hierarchies
https://docs.microsoft.com/en-us/power-bi/service-admin-rls
https://blog.tallan.com/2018/04/10/row-level-security-in-power-bi-part-1-roles-and-users/
Thanks @amitchandak there are a few articles there I haven't read, but I'm still not sure how I can make this work for me. All of these examples are all filtering from 1 column, where I have 3 possible columns to filter on dependant on who is accessing the data.
I think I'm wanting some guidance on how best to set this up, I just can't seem to get me head around it.
Hi , @NAV_81
You may need to use USERNAME()/USERPRINCIPALNAME() function to implement dynamic row level security .
Please check if the workaround as described in this thread helps.
https://community.powerbi.com/t5/Desktop/DAX-Code-for-Dynamic-RLS/td-p/807960
Best Regards,
Community Support Team _ Eason
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
92 | |
83 | |
71 | |
49 |
User | Count |
---|---|
143 | |
120 | |
110 | |
59 | |
57 |