Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Display Not selected values from Slicer (Consider selections from other slicer)

Hello,

I need your help in creating dax measure to display values which are not selected in a slicer.

CustomerYear
A2019
B2019
C2019
D2019
B2020
A2020
A2021

 

I have two slicers, year and customer. when user select a year and customer then I need to display in a table where customers are not selected.

for example slicer selection Year: 2019, customers: A B C then result should be  D

Example 2: Year: 2020 customers: A then result: B

If no customers selected/ all selected then table should be empty.

 

Please let me know how to resolve this

Thank you.!

 

7 Replies

  • Anonymous , Try


    new table = except(filter(all(table[customer]),table[Year] in values(Table[Year])), allselected(table[customer]))

     

    or a measure

     

    new measure = calculate(count(Table[customer]), filter(all(Table[customer]), Table[customer] in except(filter(all(table[customer]),table[Year] in values(Table[Year])), allselected(table[customer])) ))

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hello amitchandak , I am unable to use [Year] column in the dax(highlighted) you have mentioned

      calculate(count(Table[customer]), filter(all(Table[customer]), Table[customer] in except(filter(all(table[customer]),table[Year] in values(Table[Year])), allselected(table[customer])) ))

       

      • Anonymous's avatar
        Anonymous
        Not applicable
        Just put a table visual on the canvas, put slicers on as well, edit the interactions between the table and slicers, so that the slicer(s) does not interact with the table. Then create a measure that will return 1 for a row (customer?) that should be shown and 0 otherwise, and then filter the rows in the visual by this measure in the Filter Pane. Easy.