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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
maurcoll
Helper II
Helper II

adding leading zeros

Good Morning

Is there a way to add leading zeros to an existing field to make it a five digit number but keeping it as type number.

All of the solutions i have seen convert it to a text field but i need it to remain as a number.

For example

1234 becomes 01234

 

Thank you

1 ACCEPTED SOLUTION
nirali_arora
Resolver II
Resolver II

In the power query editor, choose the custom column from add column tab

In the custom column formula, write the mentioned formula 

Text.PadStart(Text.From([YourExistingField]), 5, "0")

It will not change the type to text.

View solution in original post

2 REPLIES 2
nirali_arora
Resolver II
Resolver II

In the power query editor, choose the custom column from add column tab

In the custom column formula, write the mentioned formula 

Text.PadStart(Text.From([YourExistingField]), 5, "0")

It will not change the type to text.

Ahmedx
Super User
Super User

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.