Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I need some help with some Row Level Security DAX formulas in Power BI.
I have a list of Customers below and a filter selection. Some users can see all the data, and some users can only see part of the data.
Let's say I'm Customer A. Customer A can see everything on the Customer and Performance column, but the Root Cause and Sales fields need to be blank.
Example of secuirty for selecting Customer A. Notice the blank rows.
To do this I tried relating two tables then writing some DAX filtering expressions using Manage Roles. However it seams the Manage Roles feature only let's you filter out data and I end up loosing all of the other values.
Solved! Go to Solution.
What I ended up doing was using a SWITCH function. I created a new column for each role, then a Measure to Switch between the columns depending on the role.
Hi @Anonymous ,
As you know, it's "Row" level security.
You want to show blank in column value for different customers.
I think you can try to make it in DAX, something like:
measure = if(username() = "A", if(customer_name = username(),customer_name,blank()))
Aiolos Zhao
Proud to be a Super User!
What I ended up doing was using a SWITCH function. I created a new column for each role, then a Measure to Switch between the columns depending on the role.
@Anonymous , see if these can help
https://community.powerbi.com/t5/MBAS-Gallery/Microsoft-Power-BI-Unleash-row-level-security-patterns-in-Power/td-p/712613
https://radacad.com/dynamic-row-level-security-with-organizational-hierarchy-power-bi
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
85 | |
83 | |
66 | |
60 | |
57 |
User | Count |
---|---|
188 | |
111 | |
105 | |
78 | |
71 |