Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Creating a duration slicer?

Hi, 

 

Is there a way how to create a duration slicer? As of now, I can only use this: 

I would like to change it to a slider, yet this happens when I do it:

 

2 Replies

  • negi007's avatar
    negi007
    Community Champion

    Anonymous  You can group your time values using Bin feature. Right click on your time value column and select group

     

     

    Once you have group column created, first change the data type to time only and then use it in the slicer like below. As you change the slicer value, accordingly on the right visual, values are being filtered.

     

     

    The above solution should work with you and it will also get dynamically updated as more data added in the table

     

  • v-jingzhang's avatar
    v-jingzhang
    Community Support

    Hi Anonymous 

     

    Currently a range slider slicer only supports Date/numeric inputs. And when it is used to display or set a range of dates, the dates display in the Short Date format. In addition, Power BI Desktop doesn't support Duration Time data type in the model.

     

    So if you want to use a range slider slicer, you could add a column to convert the Duration column to a numeric data type column (Duration in Seconds/Minutes/...) as a workaround.

     

    Otherwise, if you want to remain the Duration Time format, you could refer to this blog. However in this way, this column cannot be used in a range slider slicer because it is in Text type.

     

    Here are some related ideas you may vote for:

    Microsoft Idea · field of "duration" type (powerbi.com)

    Microsoft Idea · Display duration in hh:mm:ss (powerbi.com)

     

    Best Regards,
    Community Support Team _ Jing Zhang
    If this post helps, please consider Accept it as the solution to help other members find it.