Forum Discussion

backflash's avatar
backflash
Helper II
3 years ago
Solved

Use Measure Values in Slicer (multi select)

Hey All, I am currently trying to use my measure results in a slicer. I already checked out some posts and I saw a solution for building this with the help of an additional table and two add. measur...
  • backflash's avatar
    3 years ago

    I solved it now with another 'workaround' - so if someone has a similar problem, maybe this helps?!

     

    I changed my measure from text/string values to a numeric approach.- Instead of clustering the last order with strings like 'Last month', 'this month', .... I simply calculated the amount of days from the last order. This way, I was able to use a slicer with integer values to filter and this solved my problems!

    I did this with the help of the following DAX measures:
    LatestDateOrder =LASTDATE(Orders[OrderDate])

    DaysSinceLastOrder = DATEDIFF([LatestDateOrder], TODAY(), DAY)

    Since I grouped the values of my measure 'DaysSinceLastOrder' in a matrix by product.group, I needed a third measure:
    MaxDaysSinceLastOrder = MAXX(product, [DaysSinceLastOrder])
    Otherwise it would have clculated the DaysSinceLastOrder for the group (latest order of product group would have been taken - but I wanted to have the oldest possible order - so the maximum of all latest orders... not the latest latest order)
    And I learned that it is not easy to use MAX() on a measure - this is why I searched for some tipps and got this very helpful video:
     
    With my measures in place I then created a table with values and corresponding slicers...
     
    this video shows very nice how to do it:
     
     
     
     
     
     

     

  • backflash's avatar
    backflash
    3 years ago

    Another nice solution I found (after changing it all from text-measure to integer-value-measure) is the following... it does not allow to use multiple option as selection in the slicer, but due to the 'all customer' option it provides more flexibility than just the single selection.

    If you want to check it out in detail, watch the video: https://www.youtube.com/watch?v=AHiCE1N0XHE

     

    Here you can see upfront, what's it ll about: