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
Orstenpowers
Post Patron
Post Patron

Problems with illustration of Year-Calendar week

Dear all,

 

I am using 

 
YEAR-CW = FORMAT('Date'[Date],"YYYY") & "-" & WEEKNUM('Date'[Date],21)
 
to illustrate Year-calendar week.
This works quite fine, but what do I need to do in order to get 2024-01, 2024-02 instead of 2024-1, 2024-2...?
So, for the weeks 1-9 I would like to have an additional 0.
 
How do I need to adjust my measure??? Any idea?
 
 
1 ACCEPTED SOLUTION
MattAllington
Community Champion
Community Champion

Wrap weeknumber inside format

 

format(WEEKNUM('Date'[Date],21),"00")
 


* 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.

View solution in original post

2 REPLIES 2
Ahmedx
Super User
Super User

YEAR-CW = FORMAT('Date'[Date],"YYYY") & "-" & FORMAT(WEEKNUM('Date'[Date],21),"00")
MattAllington
Community Champion
Community Champion

Wrap weeknumber inside format

 

format(WEEKNUM('Date'[Date],21),"00")
 


* 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
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.

Top Solution Authors