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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

24 Hour Time Table for TODAY?

Hey folks - I'm looking to create a Time Dimension table so it's always set to today.

 

So for instance today I want to have 9/7/2021 12:00:00AM for the first row, then 9/7/2021 12:00:01 AM etc etc. Is there a calculated table code I can use to create this? Maybe even add in a column for hour buckets?

 

2 REPLIES 2
Dom39999
Frequent Visitor

Hi, something like this?

TimeTable =
GENERATESERIES (
TODAY() ,
TODAY() +1,
TIME ( 0, 1, 0 )
)
lbendlin
Super User
Super User

1.  Create a calculated table

TodayCal = GENERATESERIES(0,86399)

2. Add two calculated columns

TS = TODAY()+divide(TodayCal[Value],86400)

Hr = hour(TodayCal[TS])

 

Of course you could do the same in Power Query too.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors