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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
singhy
New Member

Remove Leading Zeros in a Text String in a New Column

I have a column of alphanumeric tracking numbers set to text.  There are leading zeros and I would like create a new column that does not include the leading zeros.  The tacking numbers cover various formats and length so there is no consistent amount of leading zeros.  Any guidance would be greatly appreciated.  

 

singhy_0-1633473679519.png

 

1 ACCEPTED SOLUTION
CNENFRNL
Community Champion
Community Champion

Text.TrimStart([Invoice Number], "0")

Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

2 REPLIES 2
KNP
Super User
Super User

@CNENFRNL has provided an elegant solution to your request.

Here is a useful post should your scenario get more complex. [https://www.excelguru.ca/blog/2015/11/19/keep-only-numbers-in-power-query/]

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
xOIEmaj

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
image
fabric-SUbadge
Proud to be a Super User!
CNENFRNL
Community Champion
Community Champion

Text.TrimStart([Invoice Number], "0")

Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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
Top Kudoed Authors