Forum Discussion
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.
- Anonymous5 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])ReturnCALCULATE(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
- Pragati11Super User
Hi easyleesie ,
I have used the Time Brush Slicer custom visual in the past to have time as a slicer on the report. It works well in most of the scenarios. You can check it here: https://appsource.microsoft.com/en-us/product/power-bi-visuals/wa104380798?tab=overview
Thanks,
Pragati
- AnonymousNot 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])ReturnCALCULATE(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. - easyleesieHelper I
Thanks for pointing me to this visual, Pragati. I used it, but it still feels like cheap answer to what must surely be solvable.