Extended Date Table (Power Query M function)

Totally agree with @DavieJoe here. If you need an additional roadmap to help guide you through all the columns in the Date table, I would recommend downloading the EDNA Extended Date Table Cheat Sheet.

The Cheat Sheet (and some awesome additional resources) are available for free to members and nonmembers at the link below.

  • Brian
2 Likes

Thanks Brian, I’d somehow missed this!

@DavieJoe,

I’m actually working up a video for next week on the Resource Pack, since there are some other absolute gems in there that folks may also have missed - in particular, a really cool program called Data Randomizer that @sam.mckay built that has a variety of great uses.

  • Brian
2 Likes

Maybe its time to close this thread and start a brand new one with updated code along with videos/cheat sheet. its hard to follow :slight_smile:
thanks
Keith

1 Like

As always, thanks for your thoughts @Keith I really appreciate it.

This thread is closed and all relevant information can be found in the initial post, which is updated to reflect the current version and related content.

Splitting the topic will create other issues, like which is the correct version?
Members will always have questions and when on topic, I’m fine having them here (in this special case). Although the general best practice remains, not to ask “new” questions in a closed thread.

Thank you for being such an active member on this forum!

2 Likes

ok…it was just a thought

thanks

1 Like

I am trying to use the extended date table to put in an academic year in the format of e.g. 20/21, 19/20 etc. 1st August is the start of the academic year (i.e. 01/08/2020 is the start of year 20/21, which ends on 31/07/2021). I wanted to just add this to the end of the date table in PQ, but struggled with the commands to use. I can create a calculated column in DAX just fine, but wanted to have it in PQ so I can save it and easily reuse it in future reports. The best I have been able to get to is e.g. 20/20, 19/19. I no longer have the code I was unsuccessfully using, but I was getting stuck on being able to add or subtract from the last two digits of the year because they were text. Does anyone have any ideas? As I say, I have managed to get by through DAX, but it isn’t how I would like to achieve this.

Hi @The_Bishop,

Please create a new thread for your question.
Thanks!

1 Like

Thanks, Melissa. I did wonder whether or not I should.

2 Likes

Hello @Melissa, Thank you so much for creating and sharing with us. I am teaching Power BI in my country, Myanmar or Burma and I would be very grateful if I can use this M code date table in course.

Could you kindly let me know your permission?

Thank you so much.

2 Likes

Hi @KhinKyeSin,

The code is posted on an open forum, so everyone can access it without restrictions.
That said I would sincerely appreciate it, if you’d ask your students to always get the latest version directly from the initial post within this Forum thread. So they can take advantage of any modifications/updates as soon as they become available.

Thank you and best of luck with the course!
Melissa

3 Likes

Thank you so much. That’s very kind of you. Yes, I will do it definitely by referring the initial post within the forum thread.

2 Likes

I’m getting a syntax error:

Expression.SyntaxError: Token Eof expected.

1 Like

Hi @dmartin

Just a thought, sounds like you didn’t copy everything in the coding. you might be missing ending bracket at the end of the code.

Check the coding again :slight_smile:
thanks
Keith

3 Likes

Thank you Keith. I actually found a period at the end of my code. Not exactly sure how that got there but your message made me take another look.

Now I just need to figure out how to use the Calendar table with my data.

Thanks!
-Dale

2 Likes

@dmartin
I’m glad i could help.
thanks
Keith

1 Like

Is there a video that shows how this table can then be used with existing tables that contain date fields? Sorry, I am brand new to Power BI and trying to get my data sorted by Month, Quarter and Year and have existing date tables within my data.
I’m not sure how to use this today in conjunction with my current date fields within my existing data.
Any help would be appreciated.

Thanks,
Dale

1 Like

Hi @dmartin. A great place to start would be the free eDNA ultimate beginners’ courses; date tables along with many other essential topics are covered here.

Hope it helps.
Greg

@dmartin ,

In addition to @Greg’s recommendations above, I would also recommend that anyone working with the Extended Date Table download a copy of the “Cheat Sheet” that we prepared for this purpose.

  • Brian
2 Likes

Thanks Greg.

1 Like