cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GJ217
Resolver I
Resolver I

DayofWeek Starts with 1 instead of 0

Hi,

 

The below [M] code shows brings back Monday  as number 1 and it need to bring Monday back as 0. 

 

Does anyone know how this can be done?

 

DayofWeek.jpg

 

 InsertDayWeek = Table.AddColumn(InsertDayOfYear, "DayOfWeek", each Date.DayOfWeek([Date], Day.Monday) + WDStart, Int64.Type)

 

1 ACCEPTED SOLUTION
JW_van_Holst
Resolver IV
Resolver IV

2 REPLIES 2
GJ217
Resolver I
Resolver I

@JW_van_Holst 

 

This works, thank you!

 

 DayofWeekv2.jpg

JW_van_Holst
Resolver IV
Resolver IV

Omit +WDStart ?

Helpful resources

Announcements
Winner of T-Shirt Design

Power BI T-Shirt Design Challenge 2023

Find out who won the T-Shirt Design Challenge and the top 3 finalists.

March 2023 Update3

Power BI March 2023 Update

Find out more about the March 2023 update.