Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Slicer select all the items

I have two items in my slicer checker called -  1) Suspicious sellers 2) Unauthorised sellers   If I select both 1 and 2, I want to show data for only suspicious even I select all, Is that possi...
  • v-xuding-msft's avatar
    v-xuding-msft
    6 years ago

    Hi Anonymous ,

     

    You could follow the steps to have a try:

    • Create a table
    Slicer = VALUES('Table'[Sellers])
    • Create a measure
    Measure = 
    var Selection = ALLSELECTED(Slicer[Sellers])
    var TotalSales = CALCULATE(SUM('Table'[Sales]),FILTER('Table','Table'[Sellers] in Selection))
    var SuspiciousSellers = CALCULATE(SUM('Table'[Sales]),FILTER('Table','Table'[Sellers] = "Suspicious sellers"))
    var CountSelection = COUNTROWS(Selection)
    return
    IF(ISFILTERED(Slicer[Sellers]),IF(CountSelection>1,SuspiciousSellers,TotalSales),0)

    For the option of "Select all", we can't get data from it. The result will show 0 (no filter) while using it in my sample. For more detais, please download the attachment below to try.