Forum Discussion

DorienM's avatar
DorienM
Icon for Helper II rankHelper II
4 years ago
Solved

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+ s...
  • smpa01's avatar
    4 years ago

    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 ()
        )
    )