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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
jensroy
New Member

Weeknumber bug or intended?

Hi all,

 

I have a column formated as "Date" in the way of "yyyy-mm-dd", named "date2". My data starts on 2016.01.01 until today.

 

I currently report on Weekly activites, and I wish to use the following formula to extract week number from [date2]

 

Weeknumber = WEEKNUM('Activites'[date2],2)

 

However.... January 1st is considered Week 1. Actually January 1st belongs to week number 53 in year 2015.

 

Is there a way to make this work out of the box?

1 REPLY 1
MattAllington
Community Champion
Community Champion

Well it is not a bug. There are literally hundreds of different ways a business can use a calendar, so functions can't cater for them all. The solution is to create a calendar table.  Read my blog article here http://exceleratorbi.com.au/power-pivot-calendar-tables/

 

in in your case, you just add a week number ID column that matches your needs and use that column instead of the formula you mention. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

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 Solution Authors