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

What Join?

Hello at All,

in this case:

Load * Inline [
item, remaining qty
AAA, 100
BBB, 200
BBB, 90
];

Load * Inline [
item , Cost
AAA, 10
BBB,30
BBB , 10
];

What is the Join I have to use to abtain:

AAA 100 10
BBB 290 100

Thank

Best Regards s.

Slash [:)]

1 Reply
Not applicable
Author

The answer is : Magic Join, because you can't have BBB 290 100, but BBB 290 40 ! Big Smile

Here's the real answer :

First_Table:
Load * Inline [
item, remaining qty
AAA, 100
BBB, 200
BBB, 90
];

Second_Table:
Load * Inline [
item , Cost
AAA, 10
BBB,30
BBB , 10
];

Third_Table:
Load item as Item, sum([remaining qty]) as Quantity
Resident First_Table
group by item;
Join Load item as Item, sum(Cost) as COST Resident Second_Table
group by item;

Hope this helps...