Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Leading zeros, text() not working

Hi guys I've some columns with the id: 3755 and 00003755 and they're diferent entities, but qlikview is assuming they are the same,

what I've done was loading as text like this:

See my entire script bellow ->

But qlikview still assumes they're numbers, from what i read the text() function should force qlikview to interpret as text and not number.

I've deleted all my script and attached a qvd with the problem only, if you search for the 3577 you see the id is repeated twice because the first is "3755" and the second is "00003755" and qlikview doesn't interpret as text, but in the load i put the text() function

23 Replies
Not applicable
Author

I already added the records to the main post

Not applicable
Author

No because so of the field contents also can be varchar, my id's syntax are:

80808054

00000XXXX

353535

E7575

5454FA

so i've to read as text

Not applicable
Author

I've notice that Qlikview forum had changed my *.csv to *.csv.xls they're csv files

ashfaq_haseeb
Champion III
Champion III

Hi,

There is no problem with QlikView Text Function It works as designated.

I think the problem is with export files you have, as In Excel I don't see any leading zeros. and it is tab or comma separated file.

I believe you got this Excel export from some software, I would suggest to ask the user to export in UTF8 and Codepage 1256 will solve your issue.

Text Function work as is is supposed to.

Have a look at the attached document.

Regards

ASFAQ

Not applicable
Author

But ASFAQ you didn't tried to LEFT JOIN with the locations resource, because it's when you left join they will load the issues, in another words the main problem is in the locations file. because is where is the ex: 00003755 and the id 3755.


If you open in excel, excel will ignore the leading zeros by default thats why you don't see them, try to open with notepad++ or another simple txt editor


Try to load the first column of the Locations_backup.csv and see if Qlikview will not repeat the entries.


i've made a new qvd with the problem only, open the document and search for 3755 as example

ashfaq_haseeb
Champion III
Champion III

Hi,

Strange I tried but its not joining properly.

May be Henric Cronström can help you here.

Regards

ASHFAQ

ashfaq_haseeb
Champion III
Champion III

Hi I have tried without converting to text and it do work for the case 3755.

Regards

ASHFAQ

Not applicable
Author

You can see the 00003577 in the test field or is Qlikview assuming that 3577 have 2 names? I've tried and Qlikview merged 00003577 and 3577

ashfaq_haseeb
Champion III
Champion III

Hi,

Look at the attached I believe It worked now.

Regards

ASHFAQ

Not applicable
Author

No Ashfaq this is what i'am talking Qlikview had merged 00003577 & 3577 and assumes thats the same id with 2 diferent names, the expected result is 2 distinct id and names. !Untitled.png