Forum Discussion

easyleesie's avatar
easyleesie
Helper I
5 years ago
Solved

Time in slicer

Hi All

 

This is very annoying. I have a whole lot of transactions occurring at different times. I've bucketed the time to the hour in which the transaction happened...

 

But when I make a slicer (hoping to get 0hr to 24hr) I get the 1899 time trick... 

 

and yet, when I turn that to a list, I get exactly what I want...

 

 

Please help. Thanks guys.

 

  • Anonymous's avatar
    Anonymous
    5 years ago

    easyleesie 

    To enable the between slicer for time, you may use the following workaround. Check the pbix if needed.

     

    1. Add a what if parameter as the hour slicer. 

     

    2. Create the following  measure to filter with the parameter slicer.

    Measure =
    var _min = minx(allselected(Parameter), [Parameter])
    var _max = MAXX(ALLSELECTED(Parameter),[Parameter])
    Return
    CALCULATE(COUNTROWS('Table'),FILTER('Table',HOUR([Time])>=_min && HOUR([Time])<=_max))
     

     

     

    Paul Zheng _ Community Support Team
    If this post helps, please Accept it as the solution to help the other members find it more quickly.

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    easyleesie 

    To enable the between slicer for time, you may use the following workaround. Check the pbix if needed.

     

    1. Add a what if parameter as the hour slicer. 

     

    2. Create the following  measure to filter with the parameter slicer.

    Measure =
    var _min = minx(allselected(Parameter), [Parameter])
    var _max = MAXX(ALLSELECTED(Parameter),[Parameter])
    Return
    CALCULATE(COUNTROWS('Table'),FILTER('Table',HOUR([Time])>=_min && HOUR([Time])<=_max))
     

     

     

    Paul Zheng _ Community Support Team
    If this post helps, please Accept it as the solution to help the other members find it more quickly.

  • Thanks for pointing me to this visual, Pragati. I used it, but it still feels like cheap answer to what must surely be solvable.