The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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?
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.
User | Count |
---|---|
12 | |
9 | |
6 | |
6 | |
6 |
User | Count |
---|---|
25 | |
14 | |
14 | |
9 | |
7 |