Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
girish_talele
Contributor

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
Highlighted
girish_talele
Contributor

Re: Pick last 4 values from another table 1

Dear Experts,

Is there any way out??

Highlighted
Not applicable

Re: Pick last 4 values from another table 1

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

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

Highlighted
Not applicable

Re: Pick last 4 values from another table 1

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.