Forum Discussion

Budfudder's avatar
Budfudder
Helper IV
7 years ago
Solved

Reverse Contains?

I have a table containing listings of of our sales, and each row contains (among other data) the product(s) sold in that sale.   I have a slicer containing various types of products. The idea is th...
  • AlexisOlson's avatar
    7 years ago

    If you have a table that contains your product types (not related to your product table), then you can write a measure that checks if the product matches any of the selected ones:

     

    Visible = 
    MAXX(
        VALUES(ProductTypes[Type]),
        MAXX(Products,
            IF(
                SEARCH([Type], Products[Product], 1, 0) > 0,
                1,
                0
            )
        )
    )



    Then just set the visual level filter to only show [Visible] = 1.