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
raul1
Frequent Visitor

RLS Issue when two True Values are found

Hi,

 

I'm having an issue to get my RLS function to work when for a specific use i get two true values.
Power BI apparentely bugs and keeps trying to load for 10-15min  then it says viasuals exeeded limits.

RLS Function: Country = User_Country
User_Country = LOOKUPVALUE('User'[Country];'User'[Name];[UserName])

Eg.: For Bob, i wan't to filer a list to show only the countries he should see. For John and JAck RLS works perfectly.

'User' List
Name            | Country
Bob                | US
Bob                | France
John               | China
Jack                | UK

Does anyones knows how to solve this?

I've tried to change the acesss list ot looik like this, yet it did not work:

Name             | Country
Bob                | US || France

 

Bob | US ; France

Thanks for your help!

1 REPLY 1
v-haibl-msft
Employee
Employee

@raul1

 

I'm not sure if I understand your scenario correctly. Based on your description, if you have two tables with 1:* relationship as below.

 

RLS Issue when two True Values are found_1.jpg

 

You can try to define the RLS function like:

 

[Country] = CONCATENATEX( FILTER( User, User[Name] = [UserName] ), User[Country], " ; " )

RLS Issue when two True Values are found_2.jpg

 

Best Regards,
Herbert

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.