Forum Discussion

vipett's avatar
vipett
Icon for Helper III rankHelper III
1 year ago
Solved

Volume slider type slicer for date (single select)

I've been asked to produce a few visuals where they want to select dates based on a volume slider type slicer.

I've tried the what if parameter and set a numerica value (i.e. minimum 20250101 and max 20271231), but of course that doesn't work as it shows values like 20250199 and so on. I guess I could set a value range between 1-1095 and link those numbers to dates and then display the date in a card, but difficult to navigate then..

 

The Microsoft Timeline 2.4.0 is probably the closest to the desired outcome I can get but still not really there.

 

Is there another solution?

  • Hi vipett ,

     

    Have you tried doing before or after selection and the just create a measure that uses the last date to filter your visuals something similar to:

    Max date = 
     var MaximumDate = MAXX(ALLSELECTED('Table'[Date]), 'Table'[Date])
    RETURN
    COUNTROWS(FILTER('Table', 'Table'[Date] = MaximumDate)

    The use this on the table has a filter is not blank:

     

4 Replies

  • Hi vipett ,

     

    Have you tried doing before or after selection and the just create a measure that uses the last date to filter your visuals something similar to:

    Max date = 
     var MaximumDate = MAXX(ALLSELECTED('Table'[Date]), 'Table'[Date])
    RETURN
    COUNTROWS(FILTER('Table', 'Table'[Date] = MaximumDate)

    The use this on the table has a filter is not blank:

     

    • vipett's avatar
      vipett
      Icon for Helper III rankHelper III

      Thanks!

      Worked with "before", not with "after"

      • MFelix's avatar
        MFelix
        Icon for Super User rankSuper User

        Hi vipett ,

         

        With After you need to use the MIN and not the MAX syntax for the filtering option since you want to catch the first value of your dates and not the last one.

         

        Apologies for not adding that to the previous post.

  • v-saisrao-msft's avatar
    v-saisrao-msft
    Icon for Community Support rankCommunity Support

    Hi vipett,

    Thank you for reaching out to the Microsoft Fabric Forum Community.

    MFelix, thanks for your helpful insights.

    I have used the sample data to recreate the scenario related to your issue. And also attached the PBIX file and included the link for your reference:
    Create a numeric or date range slicer in Power BI - Power BI | Microsoft Learn

     

    If this post helps, then please consider Accept it as a solution to help the other members find it more quickly.

     

    Thank you.