Forum Discussion

nemo189's avatar
nemo189
Frequent Visitor
2 years ago
Solved

Dynamic filteration of table

So I have a table as shown.Now, I have a slicer with column 1 values in it. I am creating a table visual to show all the columns. If I select value A in slicer , then the output should be all ...
  • Fowmy's avatar
    2 years ago

    nemo189 

    Create the following measure and assign it in the visual filter of the table viz:

    Flag = 
    
    VAR __C1 = SELECTEDVALUE( Col1_Table[Col1])
    VAR __ExcludeC3 =   CALCULATETABLE( VALUES( Table1[Col3] ) , Table1[Col1] = __C1 , REMOVEFILTERS(Table1) )
    RETURN
    
    SWITCH(
        TRUE(),
        SELECTEDVALUE( Table1[Col1] ) = __C1, 1,
        NOT (SELECTEDVALUE( Table1[Col3] ) IN __ExcludeC3), 1,
         0
    )
    

    File is attached