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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.