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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
Super User
Super User

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
Super User
Super User

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors