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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
DorienM
Helper II
Helper II

How can I include multiple strings in a "Does not contain" filter?

I have a table that I need to filter out rows where 'Table1'[Name] does not contain one of many strings, this is easy to do if I only have two potential strings but in my case I have upwards of 10+ strings I need to filter out. I would prefer to do this on the report itself using visual level filters rather than in Power Query if possible.

 

As an example I need to exclude rows in the table below that contain one of "TEST", "DEV, or "TRAINING".

Name
3042-TEST
VDI-2291
WIN10-DEV1
KEVIN
TRAINING-21
TRAINING-22
TRAINING-23
DC-CGY1
SQLSVR1

 

This should return these rows only:

Name
VDI-2291
KEVIN
DC-CGY1
SQLSVR1
1 ACCEPTED SOLUTION
smpa01
Super User
Super User

@DorienM  you can use the following measure

Measure =
CALCULATE (
    COUNTROWS ( t1 ),
    FILTER (
        t1,
        CONTAINSSTRING ( t1[Name], "TEST" ) = FALSE ()
            && CONTAINSSTRING ( t1[Name], "DEV" ) = FALSE ()
            && CONTAINSSTRING ( t1[Name], "TRAINING" ) = FALSE ()
    )
)

 

smpa01_0-1636484222891.png

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

View solution in original post

3 REPLIES 3
smpa01
Super User
Super User

@DorienM  you can use the following measure

Measure =
CALCULATE (
    COUNTROWS ( t1 ),
    FILTER (
        t1,
        CONTAINSSTRING ( t1[Name], "TEST" ) = FALSE ()
            && CONTAINSSTRING ( t1[Name], "DEV" ) = FALSE ()
            && CONTAINSSTRING ( t1[Name], "TRAINING" ) = FALSE ()
    )
)

 

smpa01_0-1636484222891.png

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

 

If you don't want to use a measure, the following youtube video helped me, it seems the native UI can do this if you trick it slightly!

https://www.youtube.com/watch?v=olZCiwvrEGs

 

That worked great, thanks 🙂

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.