Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Specialist II
Specialist II

How I can remove leading zeroes

Hello, colleagues.I have a small problem, which I can't resolve elegant.

I want to remove leading zeroes from my Data.

I tried to do some text / num converting, but it didn't help me.

See attached file

31 Replies
Highlighted
Specialist II
Specialist II

Hello,

Yes I Load data from SAP, but not R3, I Use SAP BW.

Ufortunally, I can't use your approach because I don't Know how much zeroes are leading in each Material.

Highlighted
Not applicable

Take a look at the enclosed where leading zeros are removed.

Highlighted
Specialist II
Specialist II

Hello, DK_ASN

That's a great. Thank you for your suggestion.

Highlighted
Not applicable

I have had great success with

evaluate(OriginalField & '* 1') as MyStrippedField;

Evaluate to force the field to be evaluated as a numeric the & '* 1' portion makes that evaluation against algebraic identity.  if I need to also format a decimal point such as a string with leading zeros that also needs a decimal point placed as money

evaluate(OriginalField & '* .01') as MyStrippedField;

Or whatever the number of characters you need the field moved .1 .01 .001 etc.

Hope this helps.

Nick Dighera

WIT Inc Troy Michigan

Highlighted
Partner
Partner

This always worked great for me:

replace(ltrim(replace(MATNR, '0', ' ')), ' ', 0)

Highlighted
Partner
Partner

You can use the following code

may be this can help you out.

mid(MATNR,FindOneOf(MATNR,'123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'))

Highlighted
Not applicable

Thanks Rakesh

Very elegant

Highlighted
Contributor III
Contributor III

This worked great!  Thank you.

Highlighted
Not applicable

Great! far more simple than what I've been using up to now!

Thank you!

Highlighted
Not applicable

Than you very much.