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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors