Reply
mattkocak
Kudo Kingpin
Kudo Kingpin
Partially syndicated - Outbound

Slider Slicer that Includes Time (Not just Date)

Hey all,

 

I have a Time column that I would like to create a slider slicer for, similar to what's available for a Date column.

 

tetra_matt_1-1654870155159.png

 

However, I haven't been able to find a way to do this. If I add a Time column to a slicer and set the visualization method to "Between", it shows a 1899-12-30 date without any other options. As an FYI, all of my data is within a 24-hour period so duplicate times on different dates are not an issue.

 

tetra_matt_0-1654869696976.png

 

Similarly, if I do this with a Date/time column instead of just a Time column, it simply uses the date piece of the value and leaves off the time piece.

 

tetra_matt_3-1654870881867.png

 

I know that one can add a "zoom slider" to some individual visuals to create a similar effect, but I need to actually slice the data based on time, not just adjust the visual display.

 

Is there a way to implement a slider slicer based on the time piece?

 

Best,

Matt

2 ACCEPTED SOLUTIONS
lbendlin
Super User
Super User

Syndicated - Outbound

No, that is not possible. Use the filter pane instead.

View solution in original post

raymcgaw
Frequent Visitor

Syndicated - Outbound

I was able to make a time slicer, but it was indepentent of the date, so you would first have to filter the date and then the time.

 

In power query, I split the time and minutes from the timedate into text, then converted back into a number (the minutes need to be padded with a zero):


Number.From(
Text.From(Time.Hour([Timestamp_Time])) &
Text.PadStart(Text.From(Time.Minute([Timestamp_Time])), 2, "0" ))

raymcgaw_0-1691511917186.png

 

I created a slicer with the number in it (used Greater than or equal to, but Between also works):

raymcgaw_1-1691512371614.png

 

To get it to look like time, I formatted the number to 0#:##

raymcgaw_2-1691512412997.png

 

 

View solution in original post

9 REPLIES 9
raymcgaw
Frequent Visitor

Syndicated - Outbound

I was able to make a time slicer, but it was indepentent of the date, so you would first have to filter the date and then the time.

 

In power query, I split the time and minutes from the timedate into text, then converted back into a number (the minutes need to be padded with a zero):


Number.From(
Text.From(Time.Hour([Timestamp_Time])) &
Text.PadStart(Text.From(Time.Minute([Timestamp_Time])), 2, "0" ))

raymcgaw_0-1691511917186.png

 

I created a slicer with the number in it (used Greater than or equal to, but Between also works):

raymcgaw_1-1691512371614.png

 

To get it to look like time, I formatted the number to 0#:##

raymcgaw_2-1691512412997.png

 

 

It works!

Syndicated - Outbound

can you please elaborate the process in step by step in Power BI ?

 

Syndicated - Outbound

Hi raymcgaw, thanks for the sweet solution, but how did you format the slicer? In powerBi I can't find the settings you posted for formatting the new number. 

Syndicated - Outbound

Select the field in the data pane and then go to Column Tools, the format option will be in the main ribbon:

 

raymcgaw_0-1707496026784.png

 

Syndicated - Outbound

First off, thanks for posting your solution.

 

In implementing your solution, the time slicer show "times" like 01:80.  Were you able to bound in some way what values the number slicer values could show for "minutes" i.e. 00-59?

Syndicated - Outbound

Just to note, this is just a mask for a number and the way the slicer works is by giving you all numbers in a range.  While 01:80 is not a valid time, it is still filtering the correct range since there will be no time (number) in your dataset greater than 0159 until you get to 0200.  I have done some workarounds below until there is a proper solution:

 

If you are able to limit your slicer within a fixed hour period (ex. 10:00 - 10:59), you can force the values by adjusting the filters of the number.

If you are slicing times greater than a one hour block (ex. 10:00 to 13:00), then I would suggest removing the slider part of the slicer and just have manual inputs (make sure users know it is 24-hour formatted).  

Syndicated - Outbound

Cool, a very clever solution!

lbendlin
Super User
Super User

Syndicated - Outbound

No, that is not possible. Use the filter pane instead.

avatar user

Helpful resources

Announcements
FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)