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: 
Not applicable

Load & link problem

Hi all

I have the following issue:

We have itemcodes which are linked to fathercodes and itemcodes which are not linked to fathercodes.

Both itemcodes & fathercodes contains sales figures.

I want to load these itemcodes which are linked to fathercodes as the fathercodes but add the sales figure of both the itemcode & fathercode together. On the other hand I want to load those itemcodes which are not linked to any fathercodes as themselves.

Please see attached sheet. This would make it more clear.

Thanks

1 Solution

Accepted Solutions
Not applicable
Author

Hello Christo,

sorry this was my first suggestion, had some trouble with my internet connection an hour ago:

Table:
LOAD ItemCode,
Sales
FROM
[41690.Link Problem.xls]
(biff, embedded labels, table is Sheet1$)
Where RecNo() < 14;

LOAD FatherCode AS ItemCode,
Sales
FROM
[41690.Link Problem.xls]
(biff, embedded labels, table is Sheet1$)
Where RecNo() < 14
and Len(FatherCode) > 0
;


Regards, Roland

View solution in original post

5 Replies
Not applicable
Author

What about in your load script something like:

Load

if(isnull(fathercodes),Itemcodes as Itemcodes,

if not isnull(fathercodes), Itemcodes as fathercodes

suniljain
Master
Master

can you post application with limited data ?.

Not applicable
Author

Hello Christo,

I would try this, if you want to substitute ItemCode with FatherCode:

LOAD
If( Len(FatherCode) > 0, FatherCode, ItemCode) AS ItemCode,
Sales
FROM
[41690.Link Problem.xls]
(biff, embedded labels, table is Sheet1$)
Where RecNo() < 14;


Regards, Roland

Not applicable
Author

Hello Christo,

sorry this was my first suggestion, had some trouble with my internet connection an hour ago:

Table:
LOAD ItemCode,
Sales
FROM
[41690.Link Problem.xls]
(biff, embedded labels, table is Sheet1$)
Where RecNo() < 14;

LOAD FatherCode AS ItemCode,
Sales
FROM
[41690.Link Problem.xls]
(biff, embedded labels, table is Sheet1$)
Where RecNo() < 14
and Len(FatherCode) > 0
;


Regards, Roland

Not applicable
Author

Hi guys

Thank you for all the responses.

Roland, your sollution worked perfectly.

Regards