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!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
I need to change this formula so that the format will be YYYY-WW
THis formula works but the result is 201801 or 201802 so without the '-' between Year and Week
How do i change this formula ?
Solved! Go to Solution.
Hi @RonaldvdH
Create a caluclated column
Column = IF(WEEKNUM([Date])<10,FORMAT([Date],"YYYY-0WW"),FORMAT([Date],"YYYY-WW"))
Hello! So i tried to use the proposed formula but for 1st of Jan 2023 it shows me 2023.52
Can somebody help me with this?
Thank you!
Best regards,
Marlene
Hi @RonaldvdH
Create a caluclated column
Column = IF(WEEKNUM([Date])<10,FORMAT([Date],"YYYY-0WW"),FORMAT([Date],"YYYY-WW"))
@v-jutoma Is there a way to make the above a date so that it can be formatted as a custom date in the modeling area? Then you can make it continuous on the X axis rather than categorical.
Hi Maggie,
I used your method and I thought it worked as a charm, but for some reason it uses the American week (so starts on Sunday).
I tried to amend the formula to this:
Hi @saviola07, @v-juanli-msft ,
Is there any solution for this issue? Created column with this:
OrderWeekYear = IF(WEEKNUM([Order Date],21)<10,FORMAT([Order Date],"YYYY-0WW"),FORMAT([Order Date],"YYYY-WW"))
Same result needed, graphic shows that 1st January of 2023 is 1st week of 2023.
Corect result should be 52nd week of 2022.
Thanks in advance.
Hey,
I created something like this:
But it won't be a number of course:
Week Number = CONCATENATE ( YEAR ( 'Date'[Date] ); "-" & CONCATENATE ( IF ( WEEKNUM ( 'Date'[Date] ) < 10; "0"; "" ); WEEKNUM ( 'Date'[Date] ) ) )
Please mark the question solved when done and consider giving kudos if posts are helpful.
Cheers
@AlB then how do i fix the issue ?
Ive altered the formula but, like you said, it returned an error that it can't convert type Tekst to Number.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.