Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
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

14 Replies
Chanty4u
MVP
MVP

oh is it ?  its working fine for me

Chanty4u
MVP
MVP

try this

  

Num(Num#(Field,'#,##0'),'#,##0') AS FieldName,

micheledenardi
Specialist II
Specialist II

I think it depends from the fields type (numeric or string) but the only way to verify it is to connect directly to the source database and do some check.

During last year I've tried different (lots) ways to remove leading zeros and the ones i've shared is the best because it works with both numeric and string field types and it's conceptually easy to understand.

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

It's not reliable to use a sample file (excel,txt, csv...) instead a db source because during these exports the fields type change so the same qlik script could be returns different resuls.

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.
arvind_patil
Partner - Specialist III
Partner - Specialist III
Author

Tried this one also no luck buddy.

I am also  ebullient to understand the reason.

Thanks,

Arvind Patil