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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
agwalsh1812
Helper I
Helper I

how to create a calendar table with time only - hh:mm:ss granularity?

hi 

I want to create the following - preferably with DAX - I want to create a table that starts at 00:00:00 and finishes at 00:23:59 so I can map it to a column of times. Can I use the Calendar() function using Time to do that? 

Also I have a number of columns with Time - would I be better off creating one Time table and then using Dax with UseRelationship() in the measure to activate them or separate Time Tables for each of the columns? Thank you as always. 

1 ACCEPTED SOLUTION
ravsha85
Frequent Visitor

Hi @agwalsh1812  you can try with this , convert the column to time once applied also you can make use of USERELATIONSHIP for connecting multiple time columns

 

Time=
SELECTCOLUMNS (
    GENERATESERIES (
        TIME(0,0,0),
        TIME(23,59,59),
        TIME(0,1,0)
    ),
    "Time", FORMAT([Value], "HH:mm:ss")
)

View solution in original post

3 REPLIES 3
agwalsh1812
Helper I
Helper I

hi, that worked beautifully. I create a new table and then used the code. I made one tweak though 

Time =
SELECTCOLUMNS (
    GENERATESERIES (
        TIME(0,0,0),
        TIME(23,59,59),
        TIME(0,0,1)
    ),
    "Time", FORMAT([Value], "HH:mm:ss")
because I wanted the time to increment in seconds . thank you so much. 

Glad it worked for you🤝

 

ravsha85
Frequent Visitor

Hi @agwalsh1812  you can try with this , convert the column to time once applied also you can make use of USERELATIONSHIP for connecting multiple time columns

 

Time=
SELECTCOLUMNS (
    GENERATESERIES (
        TIME(0,0,0),
        TIME(23,59,59),
        TIME(0,1,0)
    ),
    "Time", FORMAT([Value], "HH:mm:ss")
)

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.