Extended Date Table

Hi,

With regards to the fantastic Extended Date Table created by Melissa, I’ve had a search through the forum, perhaps I’ve not understood the posts that were relevant but I’d like to change the week start day to start on a Sunday.

How do I amend the M code to achieve this.

Thanks

David

@DavieJoe Table.AddColumn(Table, “Start of Week”, each Date.StartOfWeek([Date], Day.Sunday), type date)

1 Like

Sorry, I can’t seem to find that.

@DavieJoe ,

@Melissa 's already got you covered. You’ve probably just skipped over this a million times without noticing it, but that option is right on the front parameters screen:

  • Brian

Man…I need to get my glasses checked :eyeglasses:

Hi @DavieJoe,

@AntrikshSharma already answered your question but just a small reminder that the Extended Date table is an ISO-8601 type calendar so weeks always start on a monday.

You can try out the Basic date table here, which does allow you to set a StartOfWeekDay parameter of type number, where 0=Sunday … 6=Saterday

The parameter that @BrianJ highlighted only allows you to switch the weekday numbering from 0…6 (default) to 1…7

2 Likes

@DavieJoe ,

Happens to me all the time. You just jump right to the stuff you need and look past the stuff you don’t. I’m actually going to be starting a YouTube series soon called Power BI Buried Treasures, about cool switches and options buried within the program that almost all of us overlook.

  • Brian
1 Like

Thanks Melissa, I hadn’t fully understood the implications of the ISO-8601 calendar…ironically…the Monday to Sunday works fine for every single report & business area…but hey-ho…I’ve discovered a reporting date requirement that is different to every other single one in the business, typical :slight_smile:

Thank you for the Basic Date Table link, ideal :slight_smile:

If it’s a blog can you do it in 40 point font please :joy:

2 Likes