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
ROG
Responsive Resident
Responsive Resident

Week number wrong

Hey all,

 

I have a big problem!
For where I work, the weeks start on a Monday, but as you can see below it's wrong.

For the Wk32 it should show values from the 8th to14th.

The columns Month, week number and date are columns from a calendar table that comes from a database.  

 

ROG_0-1660576635496.png
When I add, week start date calculated column, it shows the wrong the result as well.

ROG_1-1660577098225.png


Here is what I'm using for the calculated column.

WeekStartDate = '🔎Calendar'[Date]- WEEKDAY('🔎Calendar'[Date],2)+1//week starts on Monday

What do I need to do for my week to show the correct dates?
How can I make sure the week number 01 starts on 3/01/2022?

ROG_2-1660578057207.png

 

Thanks very much!

1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @ROG ,

According to your description, the week num of the year should starts at a weekday.

Here's my solution, create a calculated column.

Week Number =
WEEKNUM ( [Date], 2 )
    - IF ( WEEKDAY ( STARTOFYEAR ( 'Calendar'[Date] ), 2 ) IN { 6, 7 }, 1, 0 )

Both the week number and week start date get correct result.

vkalyjmsft_2-1660805187342.png

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

2 REPLIES 2
v-yanjiang-msft
Community Support
Community Support

Hi @ROG ,

According to your description, the week num of the year should starts at a weekday.

Here's my solution, create a calculated column.

Week Number =
WEEKNUM ( [Date], 2 )
    - IF ( WEEKDAY ( STARTOFYEAR ( 'Calendar'[Date] ), 2 ) IN { 6, 7 }, 1, 0 )

Both the week number and week start date get correct result.

vkalyjmsft_2-1660805187342.png

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Greg_Deckler
Community Champion
Community Champion

@ROG WEEKNUM(..., 2) has weeks starting on Monday. 

WEEKNUM function (DAX) - DAX | Microsoft Docs

Also WEEKDAY is similar

WEEKDAY function (DAX) - DAX | Microsoft Docs

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Kudoed Authors