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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Kudoed Authors