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

remove 0

Hi,

I have data like following.

How can i remove all the 0 before the real digits?

Thanks.

000000001234

000000334456

000000043467

14 Replies
Not applicable
Author

Hi Celambarasan,

Num(KeepChar(FieldName,'0123456789')) returns -

Num#(KeepChar(FieldName,'0123456789')) returns 000000001234

I'm now trying the cowboy workaround....

Not applicable
Author

Mattew, i was thinking, since data from SAP is abnormal.

may be i can load it into txt, then from txt back to QV for num() ?

i tried your formula, but keep throwing an error saying field not found...

Not applicable
Author

Matt, ignore my previous post.

your ye haaa cowboy solution works wonder.

Thanks!

matt_crowther
Luminary Alumni
Luminary Alumni

Nick,

I'm suprised the formula throws an error - it works fine for me in testing. Try this amended version, it takes into account Celambarasan's suggestion too to hopefully remove any dodgy characters:

right(keepchar(YourField,'0123456789'),len(YourField)-(FindOneOf(YourField,'123456789'))+1) as Trimmed_Number

Where you replace 'YourField' with the name of the field you're trying to trim.

All the best,

Matt

@QlikviewBI

Not applicable
Author

Matt.. it was my fault.

But it's working now.

Thanks.