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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Linking two tables, first in first out

Hello,

I want to link 2 tables and show the result in a chart, fifo wise:

Table 1

Table 2

Article:

qty

Article:

Salesprice

Jeans AA

1

Jeans AA

50

Jeans AA

1

Jeans AA

50

Jeans AA

1

Jeans AA

45

Jeans AA

1

Jeans AA

50

Jeans AA

1

Jeans AA

30

Jeans AA

1

Jeans BB

50

Jeans AA

1

Jeans BB

25

Jeans AA

1

Jeans BB

25

Jeans BB

1

Jeans BB

50

Jeans BB

1

Jeans BB

1

Jeans BB

1

Jeans BB

1

Jeans BB

1

Jeans BB

1

Jeans BB

1

Result

Article:

qty

Salesprice

Jeans AA

1

50

Jeans AA

1

50

Jeans AA

1

45

Jeans AA

1

50

Jeans AA

1

30

Jeans AA

1

Jeans AA

1

Jeans AA

1

Jeans BB

1

50

Jeans BB

1

25

Jeans BB

1

25

Jeans BB

1

50

Jeans BB

1

Jeans BB

1

Jeans BB

1

Jeans BB

1

Is there a way I could manage this?

Thanks in advance!!

4 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

This assumes your tables are already in the order you want:

Result:

LOAD

     Article,

     qty,

     autonumber(RecNo(),Article&1) as Row

FROM Table1;

JOIN (Result)

LOAD

     Article,

     Salesprice,

     autonumber(RecNo(),Article&2) as Row

FROM Table2;


talk is cheap, supply exceeds demand
Not applicable
Author

Hello,

Thanks for this idea, but unfortunatly the tables in the right order.

My result for this example is now:

Artikel

Row

Qty

Salesprice

Jeans AA

1

1

50

Jeans AA

2

1

50

Jeans AA

3

1

45

Jeans AA

4

1

50

Jeans AA

5

1

30

Jeans AA

6

1

-

Jeans AA

7

1

-

Jeans AA

8

1

-

Jeans BB

6

0

50

Jeans BB

7

0

25

Jeans BB

8

0

25

Jeans BB

9

1

50

Jeans BB

10

1

-

Jeans BB

11

1

-

Jeans BB

12

1

-

Jeans BB

13

1

-

Jeans BB

14

1

-

Jeans BB

15

1

-

Jeans BB

16

1

-

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Apparently the counters to the autonumber function need to be more different. I've edited the solution above to reflect this.


talk is cheap, supply exceeds demand
Not applicable
Author

Hi Gysbert,

Everything worked out fine! Thank you