Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Rayudu1
Helper I
Helper I

How to create Start Time and End Time Slicers for single Datetime column

Hello Team,

We have one Table.

This is the below columns,

Date-Time , value and Legends.

How to create different Start Time (Hours, Minutes ) and End Time (Hours, Minutes) Slicers .

Please find the below screenshot for reference

Rayudu1_0-1726112337691.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks for the reply from Gabry , please allow me to provide another insight:

Hi, @Rayudu1 

1.First, use the HOUR() function, the MINUTE() function, the SECOND() function, and the Right() function to create four calculated columns:

HOUR = HOUR('Table'[DateTime])
min = MINUTE('Table'[DateTime])
ss = SECOND('Table'[DateTime])
AP = RIGHT('Table'[DateTime],2)

vlinyulumsft_0-1726211723589.png

2.Next, create two more calculation tables with these four columns, one for each as a slicer:

starttime = ALLEXCEPT('Table','Table'[DateTime],'Table'[Legends],'Table'[Value])
endtime = 'starttime'

3.Next, select the filter measure in the visualization:

VAR NOW1 =
    TIME ( HOUR ( MAX ( 'Table'[DateTime] ) ), MINUTE ( MAX ( 'Table'[DateTime] ) ), SECOND ( MAX ( 'Table'[DateTime] ) ) )
VAR START1 =
    TIME ( MAX ( 'starttime'[HOUR] ), MAX ( 'starttime'[min] ), MAX ( 'starttime'[ss] ) )
VAR END1 =
    TIME ( MAX ( 'endtime'[HOUR] ), MAX ( 'endtime'[min] ), MAX ( 'endtime'[ss] ) )
RETURN
    IF ( NOW1 >= START1 && NOW1 <= END1, 1, 0 )

vlinyulumsft_1-1726211843802.png

5.Here's my final result, which I hope meets your requirements.

vlinyulumsft_2-1726211843804.png


Of course, if you have any new ideas, you are welcome to contact us.
 

Best Regards,

Leroy Lu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

6 REPLIES 6
Rayudu1
Helper I
Helper I

Please find sample data.

Rayudu1_0-1726141410381.png

 

Oh I see, I don't know if you can do it with the standard powerbi slicer. Probably you need to use the filter pane. I don't know sorry

Gabry
Super User
Super User

Please provide sample data

How to create Start Time and End Time Slicers for Line Chart.
 
Please find the sample data.

Rayudu1_0-1726142694172.png

Please find the below screenshot for reference.

Rayudu1_1-1726142917434.png

 

 

Anonymous
Not applicable

Thanks for the reply from Gabry , please allow me to provide another insight:

Hi, @Rayudu1 

1.First, use the HOUR() function, the MINUTE() function, the SECOND() function, and the Right() function to create four calculated columns:

HOUR = HOUR('Table'[DateTime])
min = MINUTE('Table'[DateTime])
ss = SECOND('Table'[DateTime])
AP = RIGHT('Table'[DateTime],2)

vlinyulumsft_0-1726211723589.png

2.Next, create two more calculation tables with these four columns, one for each as a slicer:

starttime = ALLEXCEPT('Table','Table'[DateTime],'Table'[Legends],'Table'[Value])
endtime = 'starttime'

3.Next, select the filter measure in the visualization:

VAR NOW1 =
    TIME ( HOUR ( MAX ( 'Table'[DateTime] ) ), MINUTE ( MAX ( 'Table'[DateTime] ) ), SECOND ( MAX ( 'Table'[DateTime] ) ) )
VAR START1 =
    TIME ( MAX ( 'starttime'[HOUR] ), MAX ( 'starttime'[min] ), MAX ( 'starttime'[ss] ) )
VAR END1 =
    TIME ( MAX ( 'endtime'[HOUR] ), MAX ( 'endtime'[min] ), MAX ( 'endtime'[ss] ) )
RETURN
    IF ( NOW1 >= START1 && NOW1 <= END1, 1, 0 )

vlinyulumsft_1-1726211843802.png

5.Here's my final result, which I hope meets your requirements.

vlinyulumsft_2-1726211843804.png


Of course, if you have any new ideas, you are welcome to contact us.
 

Best Regards,

Leroy Lu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Thank you so much @Anonymous "Leroy Lu"

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.