Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Can't get my data right.

hi,

i have 2 datatables, one with handled numbers and one with unhandled number. when i load them seperatly i get the right total of numbers but when i load them both the total of handled numbers is still right but the total of unhandled numbers ain't right anymore.

i know that the data is handled if the transmit number has a value, if its just a space its unhandled.



Directory;
LOAD

TRANSMITNR
if (((TRANSMITNR like ' ')),'no','yes') as HANDLED,
ARTNR,
ARTDEC,
EPIKIND,
AMOUNT
FROM
[Data\UNHANDLED\tab201102.xls]
(
biff, embedded labels, table is [Sheet 1$]);

Directory;
LOAD
TRANSMITNR,
if (((TRANSMITNR like ' ')),'no','yes') as HANDLED,
ARTNR,
EPIKIND,
VSC_MONTH,
CLASS,
AMOUNT
FROM
[Data\HANDLED\tab200923.xls]
(
biff, embedded labels, table is [Sheet 1$]);

how come i only get the right total amount of handled data and not of the unhandled data if i run this script?

please help.







4 Replies
Anonymous
Not applicable
Author

I am not sure but I think Qlikview combines the data when you use the same field names, so it will just add it togehter.

Try to load it like this: (just to see what happens)


QUALIFY *;

Unhandled:
Unqualify TRANSMITNR;
LOAD
TRANSMITNR
if (((TRANSMITNR like ' ')),'no','yes') as HANDLED,
ARTNR,
ARTDEC,
EPIKIND,
AMOUNT
FROM
[Data\UNHANDLED\tab201102.xls]
(biff, embedded labels, table is [Sheet 1$]);

Handled:
Unqualify TRANSMITNR;
LOAD
TRANSMITNR,
if (((TRANSMITNR like ' ')),'no','yes') as HANDLED,
ARTNR,
EPIKIND,
VSC_MONTH,
CLASS,
AMOUNT
FROM
[Data\HANDLED\tab200923.xls]
(biff, embedded labels, table is [Sheet 1$]);
UNQUALIFY*;







Anonymous
Not applicable
Author

PS. Assuming that TRANSMITNR is the field you want to combine the tables

Not applicable
Author

the data has to be added together so i have a listbox with al my data... but then i have a choicebox where i can press yes or no so it would show only handled or unhandled data. so if i press yes it only shows the handled data and its amount, that's correct but when i press no it shows the data but the amount ain't the right amount. When i only run the "unhandled" script without the "handled' script the amount is right.

Not applicable
Author

okey found it 😛 in the other table were other fields so i just had to concatenate them.

load handled
:
:

concatenate load unhandled
:
: