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
Anonymous
Not applicable

I want to have a column showing week number from a date column.

So I want my date column over 3 years (in format dd-mm-yyyy) to transform something into the week number table below such as the start date will be 1 Jan irrespective of year. 

Any help is welcome

Start Date

End Date

Week Number

01-Jan

07-Jan

W1

08-Jan

14-Jan

W2

15-Jan

21-Jan

W3

22-Jan

28-Jan

W4

2 REPLIES 2
Anonymous
Not applicable

Thanks for the reply.

However, I have one exception too. Could you please help me with that?

As Feb 2020 is a leap year, and I want to compare weeks of 4 years side by side, I need Feb 29th to be grouped in week9(26 Feb-04 March) which will contain 8 days. How do I make an exception week for 8 days? As this data is fetched from excel, I can modify some columns in excel too, so any help in excel is also welcome!

26-Feb

04-Mar

 W9

05-Mar

11-Mar

 W10

12-Mar

18-Mar

 W11

wdx223_Daniel
Super User
Super User

NewStep=Table.AddColumn(PreviousStepName,"Week Number",each "W"&Number.ToText(Date.WeekOfYear([Start Date],Day.Sunday),"00"))

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.