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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

How to set start date to be first Sunday of the year?

Currently it works fine because 1st Jan 23 is a Sunday, however next year it will be Monday. How do i make sure that start date within my CALENDAR() function always falls on a Monday e.g. 7 Jan 24 (Sunday)?

1 ACCEPTED SOLUTION
hendraoui
Regular Visitor

Hello,

 

You can create a new calculated column in the table containing the date column that you want to modify. You can do this by right-clicking on the table and selecting "New column".

Start Date =
DATE(YEAR([Date]), 1, 1) + MOD(8 - WEEKDAY(DATE(YEAR([Date]), 1, 1)), 7)

 

View solution in original post

3 REPLIES 3
hendraoui
Regular Visitor

Hello,

 

You can create a new calculated column in the table containing the date column that you want to modify. You can do this by right-clicking on the table and selecting "New column".

Start Date =
DATE(YEAR([Date]), 1, 1) + MOD(8 - WEEKDAY(DATE(YEAR([Date]), 1, 1)), 7)

 

Ahmedx
Super User
Super User

To be honest, I don't understand what you want.
show me what you want

Anonymous
Not applicable

some_date_table = CALENDAR(<start date is first sunday of January every year>, <last sunday of the year; i suppose I could add 364 days>)

 

How would I go on about doing the first argument?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.