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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
GJ217
Resolver III
Resolver III

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 III
Resolver III

@JW_van_Holst 

 

This works, thank you!

 

 DayofWeekv2.jpg

JW_van_Holst
Resolver IV
Resolver IV

Omit +WDStart ?

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

July Newsletter

Fabric Community Update - July 2024

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