Forum Discussion

MAPM's avatar
MAPM
Frequent Visitor
4 years ago
Solved

Multiple Contains Filters using Visual Filters

I'm currently building a report based on a Cube built by a different team. This means I cannot create custom columns or add additional datasets. I am limited to using Measures, Bookmarks, and Visual-...
  • tamerj1's avatar
    4 years ago

    Hi MAPM 
    Please refer to sample file with the proposed solution https://www.dropbox.com/t/Nd2LhJFlC0H1ZlwJ

    This requires creating a filter table with the desired strings. Can be created with code if you give more details. For now I created with hard code.

    Then create the filter measure, place it in the filter pane, select "Is not blank" and apply the filter.

     

    FilterMeasure = 
    IF (
        COUNTROWS ( ALL ( FilterTable[Selection] ) ) <> COUNTROWS ( ALLSELECTED ( FilterTable[Selection] ) ),
        COUNTROWS (
            FILTER (
                VALUES ( FilterTable[Selection] ),
                CONTAINSSTRING ( 
                    SELECTEDVALUE ( DimID[Name] ),
                    FilterTable[Selection]
                )
            )
        ),
        1
    )