Forum Discussion

NataliaLM's avatar
NataliaLM
New Member
2 years ago

Create Slicer Based on Measure Value

I would like to create slicer based on "ABC" Measure:

 



I fave following data table:


And following Measures:

Total Sales = SUM(Sales[Sales])

Cumulative % =
VAR thisProductSales = [Total Sales] /* this sets the margin for the current product  */
VAR TotalSalesAllProducts =
    CALCULATE([Total Sales], ALL(Sales[Product])) /* the total sales across all products. */
RETURN
    CALCULATE(
        [Total Sales],
        FILTER(ALL(Sales[Product]), [Total Sales] <= thisProductSales)
    ) / TotalSalesAllProducts

ABC = if([Cumulative %]<0.2,"B","A")

And I'm getting folloeing Matrix with Cumulative Sales %:


ABC Column for the same SKU may have different letter, depends which Shop/Shops I am filterring.

How to create slicer based in "ABC" measure?

 

 

3 Replies

  • I cannot create conditional column, because the value is different depends the filters used by user.
    Generally I need calculate "Sales" (and different parameters) for "A" products, so products with cumulative sales (20%-100%).
    Cumulative sales may be different for the same product, depends the filter the user uses.

    • ChiragGarg2512's avatar
      ChiragGarg2512
      Solution Sage

      Measure can not be used in slicer but this measure can be put in a table visual with this being the only column and still not being an actual slicer can work as a filter on the basis of interactions.

  • NataliaLM Slicer can not work with measure. Create a conditional column with the help of the same dax formula and use that column in slicer.

    Thank You.