Forum Discussion

josevaras's avatar
josevaras
Microsoft Employee
6 years ago
Solved

Change Week Ending using Date Query

Hello, I have the pre-made dates query below that I use in my reports. I need it so that the last day of the week is a Friday, not Saturday the way it has it now. How do I do that? Can I edit the bel...
  • Fowmy's avatar
    6 years ago

    @josevaras

    In the function, add a Day.Saturday parameter in the three functions I showed below, you can add the week from Saturday to get Friday as a weekend.

    InsertDayWeek = Table.AddColumn(InsertCalendarQtr, "DayInWeek", each Date.DayOfWeek([Date],Day.Saturday)),
    InsertWeekEnding = Table.AddColumn(InsertDayName, "WeekEnding", each Date.EndOfWeek([Date],Day.Saturday), type date),
    InsertWeekNumber= Table.AddColumn(InsertWeekEnding, "Week Number", each Date.WeekOfYear([Date],Day.Saturday)),

    ________________________

    Did I answer your question? Mark this post as a solution, this will help others!.

    Click the Thumbs-Up icon if you like this answer 🙂

    Youtube Linkedin