Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

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
Anonymous
Not applicable

@JW_van_Holst 

 

This works, thank you!

 

 DayofWeekv2.jpg

JW_van_Holst
Resolver IV
Resolver IV

Omit +WDStart ?

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.