Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Breezy
Creator II
Creator II

How to add a leading zero?

How do I add a leading zero based on the number of digits in my text string? Please see the bottom Frog ID in my example picture.

In my example:

  • Every Frog ID must have 9 digits.
  • Any Frog ID with fewer than 9 digits needs a 0 added to the beginning of the Frog ID.
  • All of Frog ID must be set as text.

 

LeadingZero.jpg

 

Thank you for your assistance

Labels (1)
4 Replies
Saravanan_Desingh

Try this,

=Text(Num([Frog ID],'000000000'))
Chanty4u
MVP
MVP

try this

 

repeat('0', (9 - len(Field))) & Field as NewField

Breezy
Creator II
Creator II
Author

Hi! Forgive my ignorance - does this go in the data load editor?

jovanTD
Partner - Contributor II
Partner - Contributor II

Is there a solution regarding this topic?