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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
HamidBee
Power Participant
Power Participant

How do I create a Time table using DAX?

I am working with tables that has time in 00:00:00 format. I'd like to create a Time table in this same format and use this to create a relationship with all of the other tables. I'd like it to go up in 00:00:01 increments. Does anyone have any idea on how I can create this using DAX?.

 

Thank you

1 ACCEPTED SOLUTION
HotChilli
Community Champion
Community Champion

GENERATESERIES(
        TIME(0,0,0), TIME(23,59,59), TIME(0, 0, 1) )

but is it a good idea with 86,400 rows in the table?

View solution in original post

3 REPLIES 3
HotChilli
Community Champion
Community Champion

GENERATESERIES(
        TIME(0,0,0), TIME(23,59,59), TIME(0, 0, 1) )

but is it a good idea with 86,400 rows in the table?

Oh nice. First time I've come across this DAX function. True, 1 second increments doesn't sound good. If I wanted to move in 1 minute increments instead of seconds how can I rewrite the code for this?. Would I be correct in writing: 


GENERATESERIES(
        TIME(0,0,0), TIME(23,59,59), TIME(0, 1, 0) )

?

DemoFour
Responsive Resident
Responsive Resident

Yes that's correct, you can move the increments in the final TIME statement = H.M.S and you can change the increments to what number you want in the appropriate way. 

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.

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.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.