Forum Discussion
whazaaa
2 years agoNew Member
Date table with seconds
Hello, I'm trying to create a table that includes all the dates, hours, minutes and seconds between two set dates. Currently I have this in the DAX : DateTable = ADDCOLUMNS( DAT...
- 2 years ago
Hello whazaaa ,
refer to this article https://kohera.be/how-to-create-a-time-table-in-power-bi-in-a-few-simple-steps/
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
Follow me on Linkedin
Vote for my Community Mobile App Idea 💡
Ahmedx
2 years agoSuper User
try this
DateTable =
CROSSJOIN (
SELECTCOLUMNS (
GENERATESERIES ( DATE ( 2022, 9, 1 ), DATE ( 2024, 9, 1 ) ),
"date", [Value]
),
SELECTCOLUMNS (
GENERATESERIES ( TIME ( 0, 0, 0 ), TIME ( 23, 59, 59 ), TIME ( 0, 0, 1 ) ),
"time", [Value]
)
)whazaaa
2 years agoNew Member
You gave a good remark regarding the total rows being 64mil. I've added a different query with only the time and added some time slots (5 sec, 1 min, etc etc)