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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Shelley
Continued Contributor
Continued Contributor

Can we have an "OR" statement for row level security?

Out of hundreds of users, typically needing access to one region or sub-region, we have two users that need access to two sub-regions. I tried creating this role:

 

NA Canada East:

[%GeoKeyForSecurity] = "NA|CAN" || "NA|EAS"

 

But when the user tried to go into the Power BI Report, all the visuals have x's and when he clicks on "see details" he receives the following error message:

"Cannot convert value 'NA|EAS' of type Text to type True/False."

 

Any ideas why this will not work? Seems like it should logically.

1 ACCEPTED SOLUTION
Shelley
Continued Contributor
Continued Contributor

I think I figured it out. I've made this mistake before in regular expressions. For the OR statement to work, I need to show two complete statements.

 

[%GeoKeyForSecurity] = "NA|EAS" || [%GeoKeyForSecurity] = "NA|CAN" 

 

Seems like it will work. 

View solution in original post

1 REPLY 1
Shelley
Continued Contributor
Continued Contributor

I think I figured it out. I've made this mistake before in regular expressions. For the OR statement to work, I need to show two complete statements.

 

[%GeoKeyForSecurity] = "NA|EAS" || [%GeoKeyForSecurity] = "NA|CAN" 

 

Seems like it will work. 

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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