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
Anonymous
Not applicable

Forcing double digits in a table column

I have a calculated column in a table that returns values from 1 to 12. However I want them to be registered as 01, 02 etc. in double digits in the table. Please let me know if this is possible and how! Thanks!

1 ACCEPTED SOLUTION
VahidDM
Super User
Super User

Hi @Anonymous 

 

Use FORMAT Dax function, try this code to add a new column:

 
Column = format([Value],"0#")
 

Output:

VahidDM_4-1637237016835.png

 

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Thanks, tried it but doesn't seem to work 🤷‍♂️

So here is the full story I guess - in the original data there is a column (text) called Period. It has values like 2019-1, 2019-2, 2019-3, ... , 2019-12. 

Now I split this column as per delimiter and got another column (text) called Period_Month. That has values like 1, 2, 3, ..., 12.

I transformed this text column into a number column. Now when I use the format function on it, it gives the same result and nothing changes!

newbieuser_0-1637238183897.png

 

 

VahidDM
Super User
Super User

Hi @Anonymous 

 

Use FORMAT Dax function, try this code to add a new column:

 
Column = format([Value],"0#")
 

Output:

VahidDM_4-1637237016835.png

 

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

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.