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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
AquaCapriLyn
Contributor II
Contributor II

How to remove leading zeros without removing the zeros in the middle and end

Hello,

 I am trying to remove leading zeros from the left of a string. I have values that look like 'GH54673045', 000005674505, MFE6453-GW, 000000000532, and 00034002GER. Could you please help me resolve this issue? I tried using the num function but it returns Null values. I also tried the Replace function but it removed the zeros in the middle. For example, 000000004230043 would return 42343 instead of 4230043

Labels (1)
2 Replies
Chanty4u
MVP
MVP

Try this

 

    Text(Num(YourField, '0')) AS   new field

AquaCapriLyn
Contributor II
Contributor II
Author

Hello @Chanty4u, I tried it but it is returning '-' for all values