Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
May 18th 10AM ET, Live Chat, bring your QlikView questions. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
sparur
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
sparur
Specialist II
Specialist II
Author

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.

Not applicable

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

sparur
Specialist II
Specialist II
Author

Hello, DK_ASN

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

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

disqr_rm
Partner
Partner

This always worked great for me:

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

lalitinmbd
Partner
Partner

You can use the following code

may be this can help you out.

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

Not applicable

Thanks Rakesh

Very elegant

lkartchner
Contributor III
Contributor III

This worked great!  Thank you.

Not applicable

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

Thank you!

Not applicable

Than you very much.