Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have data like following.
How can i remove all the 0 before the real digits?
Thanks.
000000001234
000000334456
000000043467
Hi Celambarasan,
Num(KeepChar(FieldName,'0123456789')) returns -
Num#(KeepChar(FieldName,'0123456789')) returns 000000001234
I'm now trying the cowboy workaround....
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...
Matt, ignore my previous post.
your ye haaa cowboy solution works wonder.
Thanks!
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
Matt.. it was my fault.
But it's working now.
Thanks.