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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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

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.

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")

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.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.