Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Row Level Security not working in App

Hi,

 

I added a Role for "Non Retailer A" users whom I do not want them to a "Retailer A" Geography in reports but they can see all other geographies.

 

[GEOGRAPHY] <> "RETAILER A CORP"

|| [GEOGRAPHY] <> "RETAILER A-CHICAGO"

|| [GEOGRAPHY] <> "RETAILER A-KANSAS CITY"

|| [GEOGRAPHY] <> "RETAILER A-DALLAS"

|| [GEOGRAPHY] <> "RETAILER A-CINCINNATI"

|| [GEOGRAPHY] <> "RETAILER A-SALT LAKE CITY"

 

When I then change my View as Role to "Non Retailer A" users role I am still able to see Retailer A geographies in my slicers and even the data if I select one of the Retailer A geograhies.

 

What am I doing wrong?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , condition seems fine, try like

not([GEOGRAPHY] in{ "RETAILER A CORP", "RETAILER A-CHICAGO","RETAILER A-KANSAS CITY", "RETAILER A-DALLAS", "RETAILER A-CINCINNATI", "RETAILER A-SALT LAKE CITY"})
or
[GEOGRAPHY] not in{ "RETAILER A CORP", "RETAILER A-CHICAGO","RETAILER A-KANSAS CITY", "RETAILER A-DALLAS", "RETAILER A-CINCINNATI", "RETAILER A-SALT LAKE CITY"}

 

RLS - Row Level security
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
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/

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , condition seems fine, try like

not([GEOGRAPHY] in{ "RETAILER A CORP", "RETAILER A-CHICAGO","RETAILER A-KANSAS CITY", "RETAILER A-DALLAS", "RETAILER A-CINCINNATI", "RETAILER A-SALT LAKE CITY"})
or
[GEOGRAPHY] not in{ "RETAILER A CORP", "RETAILER A-CHICAGO","RETAILER A-KANSAS CITY", "RETAILER A-DALLAS", "RETAILER A-CINCINNATI", "RETAILER A-SALT LAKE CITY"}

 

RLS - Row Level security
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
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/

Anonymous
Not applicable

@amitchandak - Thank you. The first option worked. Now I need to figure out how to assign users to this group.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.