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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Srinivas
Creator
Creator

prefix avoid zeros in dimension

Dear all,

Before Avoid zeros in My dimension.

can you resole ASAP..

000000000000001613
000000000000001614
000000000000001615
000000000000001616
000000000000001617
000000000000001618
000000000000001619
000000000000001620
000000000000001621
000000000000001622
000000000000001623
000000000000001624
000000000000001625
000000000000001626
000000000000001627
000000000000001628
000000000000001629

Thanks

Reddy

18 Replies
Srinivas
Creator
Creator
Author

My Dear Friend,

I tried but,It's not working can you do another solution it would be great help full....

Thanks& Advance

Munna

Srinivas
Creator
Creator
Author

My Dear Friend,

I tried but,It's not working can you do another solution it would be great help full....

Thanks& Advance

Munna

Srinivas
Creator
Creator
Author

Hi,

Here my fields not fixed always some time 4 digits and some times 5 digits.

Not applicable

Attached with answer. Can you check it out.

Thanks

AJ

jerem1234
Specialist II
Specialist II

I would think one of the solutions here would work. I have attached an example of using num and num#(). If none of the solutions listed here work, I would suggest uploading your app or an example of the problem you are facing (might be more complex than we thought).

Hope this helps!

MK_QSL
MVP
MVP

Try

NUM(Evaluate(YourFieldName),'#0') as YourFieldName

veidlburkhard
Creator III
Creator III

Hi Munna,

I loaded your data with leading zeros into QV and found this solution:

LOAD RawData,

  replace(ltrim(replace(RawData,'0',' ')),' ','0') as NumData

FROM

[http://community.qlik.com/thread/110099]

This expression in a first step replaces all zeros with spaces, then the ltrim function eleminates all leading zeros. At last zeros which have been replaced in the relevant number with spaces, too are again switched to zeros.

Leading Zeros.jpg

Hope this helps

Burkhard

jerem1234
Specialist II
Specialist II

Looks like I provided an example that probably exemplifies why it doesn't work

Seems like num and num# has problems when the number exceeds 14 digits. I believe some of the new solutions provided below should solve the issue.

Srinivas
Creator
Creator
Author

Hi Manish,

It's working only for numeric only but not string and numeric.

like..

200N17000

200P30IF0

200P30000

000000000000001613

000000000000001614

000000000000001616

000000000000001618

000000000000001619

000000000000001621

000000000000001623

000000000000001624

000000000000001626

1681J1400N

000000000000001705

000000000000001718

1872E01000

2260V02000

Advance

Munna