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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Row Level Security - Combine different outputs in one role

Hi there,

My problem is super easy: I want row level security on a dimension table based on three conditions.

First one is, the person only sees himself:

IF (
    MAXX (
        FILTER ( People, People[UserPrincipalName] = USERPRINCIPALNAME () ),
        People[Level]
    )
        = 1,
    People[UserPrincipalName] = USERPRINCIPALNAME (),
    1 = 1
)

Second one is like I don't want to apply any filter:

IF (
    MAXX (
        FILTER ( People, People[UserPrincipalName] = USERPRINCIPALNAME () ),
        People[Level]
    )
        = 2,
    MAXX ( ALLSELECTED ( People ), 1 ),
    1 = 1
)

And the third one is based on path. The person can only see himself and those ones, whose ranks are below him (It's not perfect yet, but its okey until I solve the main problem):

PATHCONTAINS (
    People[Path],
    MAXX (
        FILTER ( People, People[UserPrincipalName] = USERPRINCIPALNAME () ),
        People[Rank]
    )
)

The problem is, that I'm not able, to combine all of these into one SWITCH. For me, it seems like the SWITCH is not working properly in RLS. Based on Level column it could be an easy SWITCH, but unfortunately, I'm not able to figure it out. (I dont want to make this in three different roles...)

 

You can download my example PBIX from here: https://we.tl/t-0x0hNAeOab

 

Any idea? Thanks!

1 REPLY 1
v-juanli-msft
Community Support
Community Support

Hi @Anonymous

"the first one", "second one" and "the third one" refer to the rank1, rank2, rank3, right?

If so, your requirement is more like this scanario:

Dynamic Row Level Security with Manager Level Access in Power BI

 

If you have any problem, please let me know.

 

Best Regards

Maggie

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors