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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register 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.

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 Solution Authors
Top Kudoed Authors