Extended Date Table Fix

Hi @Melissa,

I believe there is miscalculation in the Extended Date Table code. The following line:

  InsertCurrentFW = Table.AddColumn(InsertCurrentFP, "IsCurrentFW", each if [FWeeknYear] = InsertISOYrOffset then true else false, type logical),

should be:

  InsertCurrentFW = Table.AddColumn(InsertCurrentFP, "IsCurrentFW", each if [FWeeknYear] = CurentFW then true else false, type logical),

Also, for flexibility purposes, would it make sense to add a variable for StartofWeek and have just one place to specify the day (Day.Monday) instead of multiples places it is used?

For example:

  StartofWeek = Day.Sunday
  InsertStartOfWeek = Table.AddColumn(InsertWeekNumber, "Start of Week", each Date.StartOfWeek([Date], StartofWeek), type date),

Thanks and great work!

1 Like

Hi @CraigS,

Thanks for the feedback.
I will look into this and report back.

Hi @CraigS,

The reported issue has been resolved; thanks for bringing it to my attention.
While you are not the first to request a “start of week day” option, please note that this M function generates an ISO-8601 calendar, which stipulates that the week begins on Monday, therefore this input is not parameterized.

All the best.

2 Likes