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
Andioli
New Member

Problem with data

Hi, 

I have a problem with the data in the column, it is showned as 1/2019 , 10/2019.. etc. How can I add a "0"and it becomes 01/2019, 02/2019..etc. Thank you!

 

Problema mes-año.jpg

2 ACCEPTED SOLUTIONS
dufoq3
Super User
Super User

Power Query solution:

Add this as new step, replace Source with your PreviousStepName and "Column1" with your column name you want to change.

 

= Table.TransformColumns(Source, {{"Column1", each Text.PadStart(_, 7, "0"), type text}})

 

 

DAX solution:

Create new calculated column, change Column1 to your column name.

 

CorrectDate = IF(LEN([Column1]) = 6, "0" & [Column1], [Column1])

 

 


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

View solution in original post

tharunkumarRTK
Super User
Super User

@Andioli 

Assuming you column data type is date, select the column and on top ribbon you will find different formattitng options and choose the appropriate one. For exmaple:

Screenshot 2024-03-30 at 9.46.14 PM.png

 

 


If the post helps please give a thumbs up


If it solves your issue, please accept it as the solution to help the other members find it more quickly.


Tharun

 

View solution in original post

2 REPLIES 2
tharunkumarRTK
Super User
Super User

@Andioli 

Assuming you column data type is date, select the column and on top ribbon you will find different formattitng options and choose the appropriate one. For exmaple:

Screenshot 2024-03-30 at 9.46.14 PM.png

 

 


If the post helps please give a thumbs up


If it solves your issue, please accept it as the solution to help the other members find it more quickly.


Tharun

 

dufoq3
Super User
Super User

Power Query solution:

Add this as new step, replace Source with your PreviousStepName and "Column1" with your column name you want to change.

 

= Table.TransformColumns(Source, {{"Column1", each Text.PadStart(_, 7, "0"), type text}})

 

 

DAX solution:

Create new calculated column, change Column1 to your column name.

 

CorrectDate = IF(LEN([Column1]) = 6, "0" & [Column1], [Column1])

 

 


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

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.

Top Kudoed Authors