Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
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.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
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