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

Pick last 4 values from another table 1

Dear Experts,

This is in extension to my earlier query (http://community.qlik.com/message/679411#679411)

In earlier query, requirement was to fetch last 4 production orders where the Prd ord link was missing. File is attached herewith.

Now we want to add two conditions while fetching LAST 4 production orders i.e. -

  1. The P_Date of Prd Ord shall be equal or less than B_Date (i.e. Biling Date)
  2. If say the Cumulative Sum of above production order qty (i.e. P_Qty) of last two Prd Ords is equals or higher than Billing Qty then no need to fetch more production orders.

Please suggest how to map the requirements.

At least 1'st requirement, which is important to us.

Regards,

Girish.

3 Replies
girish_talele
Creator
Creator
Author

Dear Experts,

Is there any way out??

Not applicable

Inter table field comparison in the Where clause is achieved using the peek function for instance:

P_Date  <= Peek('B_Date',0,'Billing')

Not applicable

from the Qview Help

Load A, B, numsum( B, peek( 'Bsum' ) ) as Bsum...;
creates an accumulation of B in Bsum.

maybe a helpful hint for the 2nd. requirement.