Discussion board where members can learn more about Qlik Sense App Development and Usage.
I have a dimension "Material Number", where the numbers can be
P IND XXX,
As result I shall get:
if only contains figures and there are zeros at the beginning then the zeros at the beginning have to eliminated. If it contains Letters, the material number shall remain so.
How shall I write in the script?
Go to Solution.
How to Trim Leading Zero's from Numeric value of a Alpha Numeric datatype
If(IsNum(Replace(LTrim(Replace(CUSTOMER,'0',' ')),' ','0')), Replace(LTrim(Replace(CUSTOMER,'0',' ')),' ','0'), CUSTOMER) as Customer
Alt(Num(Replace(LTrim(Replace(CUSTOMER,'0',' ')),' ','0')), CUSTOMER) as Customer
It works perfectly!!!!
Thanks a lot. Exactly the same problem as in the referenced post.