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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with dates

Hello,

assume the following problem.

I have several Purchase Order Lines. Each week I contact the supplier at which date he predicts to deliver.

Unfortunatley the supplier is not very reliable and he changes his confirmed delivery date each week.

So we have a kind of confirmation history. Meaning by the CreatedOnDate I know his latest change.

POLine

CreatedOnDateDeliveryDate
11-Feb-1610-Feb-16
18-Feb-1615-Feb-16
115-Feb-1613-Mar-16
122-Feb-1630-Mar-16

1

29-Feb-1612-Mar-16
222-Feb-1625-Mar-16
229-Feb-1626-Mar-16
38-Feb-161-Mar-16
315-Feb-165-Mar-16
322-Feb-163-Mar-16

I would like to see now an analysis what is the most recent Delivery Date, meaning where the CreatedOnDate is at max for the respective PO Line. As output I don't like to see the CreatedOnDate but only the Delivery Date.

POLineDelivery Date
112-Mar-16
226-Mar-16
33-Mar-16

Do you know how this is possible to build in QV?

Thanks and Kind regards

Philipp

12 Replies
MayilVahanan

Hi

Try like this

Data:

LOAD

POLIne,

CreatedOnDate.

DelieveryDate

FROM DataSource;

MaxDeliveryDate:

LOAD

POLIne,

Max(CreatedOnDate) AS MaxCreationDate

RESIDENT Data

Group By POLIne;


INNER JOIN(MaxDeliveryDate)

LOAD

POLIne,

CreatedOnDate AS MaxCreationDate,

DelieveryDate AS MaxDeliveryDate

RESIDENT Data;


In Front end

Use POLine and MaxDeliveryDate field

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
jonathandienst
Partner - Champion III
Partner - Champion III

Use FirstSortedValue:

     ...

     FirstSortedValue(DeliveryDate, -CreatedOnDate) As LatestDelivery,

     ...

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Digvijay_Singh

Like this -

Capture.JPG