Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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
MVP
MVP

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?