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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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