Hi @chrisgreenslade ,
There are requirements to a Date table so what you are proposing will never be a proper Date/Time dimension… That said, you can find examples in the M showcase category for both.
This topic includes a list of requirements for Date table.
Hi everyone,
To make it easier to find I’ve placed the updated Power Query M code function for the extended Date Table / Dates Table in the category where it belongs… I hope you’ll find it useful and if there are any questions, just reach out and let me know!
// August 2022
There has been an overhaul of the M code from when it was initially shared. This affects column names and values. In the Analyst Hub (follow this link) you can copy a version of Extended Date table which returns a r…
.
And here is M code for a Time table, that you can adjust to your needs.
Hi everyone,
@DavidNealon thought it would be a nice addition if there was a Time Table Power Query M code function available in this category as well. Now I can’t take any credit because it was designed by Gina Meronek, you can find it and the full article she wrote here .
When invoked the function creates a Time Table at a granularity of Minutes. If your requirement is different that can easily be fixed. Note that other changes might be required as well but to give you some ideas:
For Hourl…
.
And here’s a topic you might also find intresting, although it’s a totally different scenario.
I was helping a client this past week to calculate the total business hours between a start date/time and an end date/time, taking into account the working days, public holidays and non-working weekends, etc. As is often the case, I thought it...
Est. reading time: 3 minutes
1 Like