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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
MurVeman
Helper I
Helper I

Week number must display 2 digits(e.g. 01 not 1 )

Hi All,

 

I wanted to see week number in two digits not in single digit(e.g. 01 not 1), please help me with fixing the below formula. Thanks in advance.

 

Dax Formula - 

Week_Number (Overall changed on timestamp) =
"CW " &
YEAR('TestEecution (2)'[Overall Changed On Text]) &
"-" &
WEEKNUM(
'TestEecution (2)'[Overall Changed On Text]
)

 

Current results for the above formula - 

MurVeman_0-1705321480288.png

 

Thanks & Regards,

Murali

1 ACCEPTED SOLUTION

Simply do this:
Week_Number (Overall changed on timestamp) =
"CW " &
YEAR('TestEecution (2)'[Overall Changed On Text]) &
"-" &
FORMAT(WEEKNUM(
'TestEecution (2)'[Overall Changed On Text]
),"00")

Kudos and mark as solution appreciated 

zenisekd_0-1705390205441.png

 

View solution in original post

6 REPLIES 6
FREDPI
Frequent Visitor

You can also add a zero to the weeknumber and then take the right(2,weeknumber) in the formula.

 

This will give you the answer you are looking for.

the week number is coming from the data column "Overall changed on text"

zenisekd
Super User
Super User

Please refer to the following formula:
zenisekd_0-1705321772907.png

 

That week number is coming from the date

Simply do this:
Week_Number (Overall changed on timestamp) =
"CW " &
YEAR('TestEecution (2)'[Overall Changed On Text]) &
"-" &
FORMAT(WEEKNUM(
'TestEecution (2)'[Overall Changed On Text]
),"00")

Kudos and mark as solution appreciated 

zenisekd_0-1705390205441.png

 

thank you!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.