Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi all,
How can I create a Week Number column from a date column I have in my data?
I want the below data range to be 'Week 1' and so on...
10/04/20 00:00:00 - 17/04/2020 00:00:00 - WEEK 1
Thanks,
Solved! Go to Solution.
There is a week number function in DAX that should work for you.
Column =
VAR _Wk = WEEKNUM ( DATES[Date] )
RETURN
"week " & _Wk
Hi @HenryJS ,
You could refer to the following codes in query editor.
= "WEEK " & Number.ToText(Date.WeekOfYear([Column1]))
Hi @HenryJS ,
You could refer to the following codes in query editor.
= "WEEK " & Number.ToText(Date.WeekOfYear([Column1]))
@HenryJS , you can do like.
replace the startofyear('Date'[Date]) with starting date you want
Week Start With Year= QUOTIENT(DATEDIFF(STARTOFYEAR('Date'[Date]),'Date'[Date],DAY),7)+1
Week Start Date with Year = var _1 =QUOTIENT(DATEDIFF(STARTOFYEAR('Date'[Date]),'Date'[Date],DAY),7) return STARTOFYEAR('Date'[Date]) + if(_1<52,_1,51)*7
There is a week number function in DAX that should work for you.
Column =
VAR _Wk = WEEKNUM ( DATES[Date] )
RETURN
"week " & _Wk
I have some questions
1. There are 8 days from day 10 to day 17. Do you want each custom week has 8 days?
2. how to stop the week? If you don't set up the terminal day. The week number will continue growing.
Column =
VAR week="week"&ROUNDUP(('Table'[Date]-date(2020,4,10)+1)/7,0)
return if('Table'[Date]<date(2020,4,10),blank(),week)Proud to be a Super User!
how do the weeks stop? when you reach December 31 I should stop.
it looks like the fiscal year and calendar year are the same. then you can use WEEKNUM function
Proud to be a Super User!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 65 | |
| 65 | |
| 45 | |
| 21 | |
| 18 |
| User | Count |
|---|---|
| 115 | |
| 114 | |
| 38 | |
| 36 | |
| 26 |