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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ptmuldoon
Resolver I
Resolver I

DAX help combining 2 RLS Filters

I'm still learning more on how to use Dynamic RLS with Filters to isolate only the particular data and rows for user.   And I found this article this morning that has been very helpful and useful.

Power BI Row Level Security RLS Setup | Step-by-step guide (biconnector.com)

 

And I have this half working at this point based on my data and tables.  But I'm wondering/hoping if there is way to combine the below 2 filters into 1?

 

I can get the data to filter on each one separately (GL Accounts Table).  But I want to try and combine the two together if possible. 

 

CONTAINSSTRING(
    MAXX(
        FILTER(
            Users,
            Users[Email]=USERPRINCIPALNAME()
        ),
        Users[GLCategories]
    ),
    [GL Category]
)


CONTAINSSTRING(
    MAXX(
        FILTER(
            Users,
            Users[Email]=USERPRINCIPALNAME()
        ),
        Users[Departments]
    ),
    [Department]
)

 

3 REPLIES 3
ptmuldoon
Resolver I
Resolver I

This be an And && condition, where both conditions must be true.  

 

And thank you again for any help.   

 

 

CONTAINSSTRING(
    MAXX(
        FILTER(
            Users,
            Users[Email]=USERPRINCIPALNAME()
        ),
        Users[GLCategories]
    ),
    [GL Category]
)

&&

CONTAINSSTRING(
    MAXX(
        FILTER(
            Users,
            Users[Email]=USERPRINCIPALNAME()
        ),
        Users[Departments]
    ),
    [Department]
)

 

Note: Power BI Antipatterns #9: Filtering whole tables, part I – XXL BI

 

lbendlin
Super User
Super User

Combine how?  Do they both have to be true ( "&&" ) or can either be true ( "||" ) ?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.