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

3 Level Dynamic RLS

Hi All, 

 

I have the attached .pbix file that I'm trying to configure RLS for here. The TerritoryAssign table is maintained by our Sales Admin team, and I'm trying to find a solution where I don't have to reformat that table (if possible).

 

Here's the issue: I've seen many solutions that use RLS with two columns of data - Child and Parent. In the attached, I have three levels of a hierarchy - territory, district, and region. I cannot figure out the correct DAX formula to validate the RLS with these three levels.

 

Any help would be much appreciated!

3 REPLIES 3
Jeff_Schlutz
Regular Visitor

@Anonymous,

 

Try using the Switch function which is essentially the DAX equivalent of a nested if statement.

 

SWITCH( userprincipalname(), [Sales Person Email], [Sales Person Email]=USERPRINCIPALNAME(), [District Manager Email], [District Manager Email]=USERPRINCIPALNAME(),[Regional Manager Email], [Regional Manager Email]=USERPRINCIPALNAME())

 

Best regards,

 

Jeff

v-chuncz-msft
Community Support
Community Support

@Anonymous,

 

You may try using LOOKUPVALUE Function.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks for the reply  @v-chuncz-msft.

 

Unfortuntely, this solution doesn't look like it will work, because I'd have to return the UserPrincipalName() from three separate fields. 

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.