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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
matrix_user
Helper III
Helper III

DAX for days of the year include "0"

Hello,

 

I am looking for a dax expression (to include in calculated column) that will include the first nine days of the year with "0" prefix. 01, 02, 03 etc.

 

Thank you in advance.

1 ACCEPTED SOLUTION
VahidDM
Super User
Super User

Hi @matrix_user 

 

Check this link:
https://community.powerbi.com/t5/Power-Query/change-number-format-in-query-editor/td-p/1576461

 

and you can find the days number and then change the format to have "0" prefix. 01, 02, 03 etc.

New Number = FORMAT('Table'[Column1], "00")
 
output:
VahidDM_0-1658107396720.png

 

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!! 

Badges.jpg

LinkedIn | Twitter | Blog | YouTube 

View solution in original post

1 REPLY 1
VahidDM
Super User
Super User

Hi @matrix_user 

 

Check this link:
https://community.powerbi.com/t5/Power-Query/change-number-format-in-query-editor/td-p/1576461

 

and you can find the days number and then change the format to have "0" prefix. 01, 02, 03 etc.

New Number = FORMAT('Table'[Column1], "00")
 
output:
VahidDM_0-1658107396720.png

 

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!! 

Badges.jpg

LinkedIn | Twitter | Blog | YouTube 

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.