Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Num format

Hi

I have texts with ceros

For example

000031212

00000000000003131

00023232

0000444

I wanna do a 'num' but i wanna ignore the ceros. In this examples i'd like to see

31212

3131

23232

444

I don't know the length of the codes or the ceros

Thank you

Greetings

1 Solution

Accepted Solutions
sunny_talwar

Tried it with this as an expression in text box object:

=Num(Num#('000031212', '#'))

and got the following output:

Capture.PNG

I hope this helps.

Best,

Sunny

View solution in original post

5 Replies
sunny_talwar

May be like this:

Num(Num#(NumberField, '#')) as NumberField

sunny_talwar

Tried it with this as an expression in text box object:

=Num(Num#('000031212', '#'))

and got the following output:

Capture.PNG

I hope this helps.

Best,

Sunny

Not applicable
Author

This worked

Thanks

replace(ltrim(replace(field , '0', ' ')), ' ', 0)

Not applicable
Author

that worked too

sunny_talwar

I was thinking of using PurgeChar or Replace, but it would replace or purge any 0 from the number also. For example if you have 00000321203 -> output will be 32123 instead of 321203