Forum Discussion
Time in slicer
- Anonymous1 year ago
Thanks for following up. If displaying the time with a dot or colon (like 08:30 or 08.30) inside the slicer is a must, here's the best workaround given Power BI's current limitations:
You can still use the TimeInMinutes (or a decimal field) for the slicer logic, but pair it with a display column that shows the time in the format you need. Here's how you can do it:
TimeDecimal = HOUR([YourTimeColumn]) + MINUTE([YourTimeColumn]) / 60 TimeLabel = FORMAT([YourTimeColumn], "HH:mm")If your locale forces a comma in TimeDecimal, and you just need the label to show a dot or colon, create a custom label column:
TimeLabelDot = SUBSTITUTE(TimeLabel, ":", ".")Then use a custom slicer visual (like Smart Filter by OKViz or HierarchySlicer) that lets you show labels but filter using the underlying value.
Power BI's built-in slicer doesn’t support formatted display with separate logic, so using a custom visual is the most flexible option here.
Best Regards,
Hammad.
Thanks for following up. If displaying the time with a dot or colon (like 08:30 or 08.30) inside the slicer is a must, here's the best workaround given Power BI's current limitations:
You can still use the TimeInMinutes (or a decimal field) for the slicer logic, but pair it with a display column that shows the time in the format you need. Here's how you can do it:
TimeDecimal = HOUR([YourTimeColumn]) + MINUTE([YourTimeColumn]) / 60
TimeLabel = FORMAT([YourTimeColumn], "HH:mm")
If your locale forces a comma in TimeDecimal, and you just need the label to show a dot or colon, create a custom label column:
TimeLabelDot = SUBSTITUTE(TimeLabel, ":", ".")
Then use a custom slicer visual (like Smart Filter by OKViz or HierarchySlicer) that lets you show labels but filter using the underlying value.
Power BI's built-in slicer doesn’t support formatted display with separate logic, so using a custom visual is the most flexible option here.
Best Regards,
Hammad.
Thanks again, I'll try this option!
- Anonymous1 year agoNot applicable
Hi tuulia,
As we haven’t heard back from you, so just following up to our previous message. I'd like to confirm if you've successfully resolved this issue or if you need further help.
If yes, you are welcome to share your workaround and mark it as a solution so that other users can benefit as well. If you find a reply particularly helpful to you, you can also mark it as a solution.
If you still have any questions or need more support, please feel free to let us know. We are more than happy to continue to help you.
Thank you for your patience and look forward to hearing from you.- Anonymous1 year agoNot applicable
Hi tuulia,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution so that other community members can find it easily.
Thank you.- tuulia1 year agoHelper IV
Thank you, this worked!