Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Zero at left are being discarted

Hello.

I´m having a problem.

One field of my table has Zeros at left side and althought I´m using "text(myfield) as myfield" in script, Qlikview keeps processing it without the zeros. Eg: Myfield = 00000120. Qlikview show it just like that, with the 5 zeros, but at processing level it does show all article where Myfield end with 120.

Any ideas?

Thanks in advance,

Best Regards,

BS.

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

For data that looks like numbers, QV uses the first string representation it encounters as the display value. If loaded in this order:

01

1

0001

Will all display as "01".

The solution is to use text() function when loading.

text(myfield) as myfield

-Rob

View solution in original post

15 Replies
nagaiank
Specialist III
Specialist III

Add the following to your script

Set Verbatim = 1;

Not applicable
Author

Thanks for your reply but it didn´t work.

From what I´ve had read, verbatim stops the stripping of blanks... not zeros (0)...

BS.

amit_saini
Master III
Master III

Hi Bruno,

Like this???

Please see the attachment!

Thanks,

AS

Not applicable
Author

Thanks for your reply.

Yes, my field valus have that format, but I´ve got, for eg. 00000120; 00120; 120, etc... All of that values refer to a product. But Qlikview is showing all products that end with 120. Discarting zeros from its calculations!

BS.

amit_saini
Master III
Master III

You need to  Set Verbatim = 1; at the back end as mentioned below:

Thanks,

AS

ecolomer
Master II
Master II

You can try this:

LET COM=chr(39);

COM&Field&COM as MyField

Not applicable
Author

I´ve already did that! But it didn´t solved... It keeps returning 4 products to "myfield = 00000120".

I´m not understanding what its happening, because Qv show myfield with the Zeros!

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

For data that looks like numbers, QV uses the first string representation it encounters as the display value. If loaded in this order:

01

1

0001

Will all display as "01".

The solution is to use text() function when loading.

text(myfield) as myfield

-Rob

Not applicable
Author

Not sure what you mean... Sorry...