Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
slefranc
Partner - Contributor II
Partner - Contributor II

Help with set analysis

Hi,

I need some help with a set analysis expression that I can't build by myself.

Here is the deal :

- In one hand, I have some products in my stock. Each product has its own "p_id", and a reference "ref"

- On the other hand, I have some wishes "w_id" from customers on differents references "ref"

products:

LOAD * inline [p_id,ref

P1,REF A

P2,REF A

P3,REF B

P4,REF C

P5,REF C

];

wishes:

LOAD * inline [w_id,ref

W1,REF A

W2,REF A

W3,REF A

W4,REF A

W5,REF B

W6,REF D

];

The fact is that some wishes will not be satisfied because I have not enough stock of the wish reference

My problem is to evaluate with a single expression the number of wishes that could be satisfied. In the example above, it would be 3 (2 wishes for the "REF A" and 1 wish for the "REF B").

I don't want to use a graphic (I know how to do that).

I'm sure it's possible, but I really don't know how ! Thx for your help.

0 Replies