Forum Discussion

danb's avatar
danb
Resolver I
7 years ago
Solved

Invoice Drop Size with Slicer

Power BI Community,  I am running into a quandry in trying to calculate an averasge drop size of a list of invoices for stores. The issue is that i want to have a slicer that will allow me to suppre...
  • v-lili6-msft's avatar
    7 years ago

    hi, danb 

    After my research, you could try this way as below:

    Step1:

    Use a What if parameter to add a "Drop Size Threshold" slicer

    https://docs.microsoft.com/en-us/power-bi/desktop-what-if

    or you could custom a "Drop Size Threshold" slicer table and add a Parameter Value measure

    Parameter Value = SELECTEDVALUE('Parameter'[Parameter])

    Step2:

    Then add two measure

    Average Drop Size = CALCULATE(AVERAGE('Table'[Total Cases]),FILTER('Table','Table'[Total Cases]>=[Parameter Value]))
    # of Drops = CALCULATE(COUNTA('Table'[Invoice #]),FILTER('Table','Table'[Total Cases]>=[Parameter Value]))

    Result:

     

    and here is a pbix file, please try it.

     

    Best Regards,

    Lin