Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Filter Table based on multiple True/False columns

Hi all,   I am trying to create a filter table Z that manages four boolean columns in another table X. For example, if the filter is set to "A", then it filters out all the FALSE statements in colu...
  • parry2k's avatar
    7 years ago

    Anonymous add a measure in your table as below:

     

    What to Filter? = 
    VAR __filter = SELECTEDVALUE( 'Filter Table'[Filter] )
    VAR __Isfilter =  
        SWITCH(
            __filter,
            "A", SELECTEDVALUE( table3[A] ) = TRUE(),
            "B", SELECTEDVALUE( table3[B] ) = TRUE(),
            "C", SELECTEDVALUE( table3[C] ) = TRUE(),
            "D", SELECTEDVALUE( table3[D] ) = TRUE()
        )
        RETURN IF( __Isfilter = TRUE(), 1, 0 )

    on your table visual, add visual level filter and select "What to filter?" is 1  as shown below and based on your selection in slicer, it will filter table accordingly