Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
arvind_patil
Partner - Specialist III
Partner - Specialist III

Remove Preceding 0 from script level

Hi Experts,

I have one GL FIeld in that  values are like below

0011101033

08546880

000111222333

Required Output

11101033

8546880

111222333



Note : I have checked with  Num and Num # Function .


Thanks,

Arvind Patil

1 Solution

Accepted Solutions
micheledenardi
Specialist II
Specialist II

Replace(LTrim(Replace(YourField, '0', ' ')), ' ', '0')  as [YourFieldWithoutLeadingZeros]

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

14 Replies
micheledenardi
Specialist II
Specialist II

Replace(LTrim(Replace(YourField, '0', ' ')), ' ', '0')  as [YourFieldWithoutLeadingZeros]

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.
Chanty4u
MVP
MVP

its working for me

load * ,num(aaa) as new;

load  * Inline

[

aaa

0011101033

08546880

000111222333

];

Chanty4u
MVP
MVP

new.PNG

Chanty4u
MVP
MVP

or try this

LOAD *, Number8digit+0 As Number;

LOAD * Inline [

Number8digit

00000978

00001524

00001024

00012356

];

zer.PNG

Chanty4u
MVP
MVP

this also you can try

Load

  NUMBER,

  Num(NUMBER) as NUMBER1,

  NUM(Right(NUMBER, Len(NUMBER)-FindOneOf(NUMBER, '123456789')+1)) as NUMBER2

Inline

[

  NUMBER

  00000978

  00001524

  00001024

  00012356

];

arvind_patil
Partner - Specialist III
Partner - Specialist III
Author

No its not  working for me.

Thanks,

Arvind Patil

PrashantSangle

can you share sample file or screen shot of what are you trying???

Regards,

Prashant

Great dreamer's dreams never fulfilled, they are always transcended.
arvind_patil
Partner - Specialist III
Partner - Specialist III
Author

Hi Michele,

Thanks for prompt reply it works for me .

But  I am very enthusiastic to understand why num and num # not worked.


Thanks,

Arvind Patil

arvind_patil
Partner - Specialist III
Partner - Specialist III
Author

HI Chanty,

I tried your answers but it wont work for me.

Thanks,

Arvind Patil