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

First date

Hi!

I have a table with delivered items. Same item number can be delivered in different dates, but I want to know first delivery date.

In the Data table below there's three different item numbers, with different delivery dates, and delivered quantity per date.


From this I'd like to view the first delivery date for each Item no.

I have tried FirstSortedValue, but without success.

Is there anyone who has an idea how to do this?

//Johan

1 Solution

Accepted Solutions
john_duffy
Partner - Creator III
Partner - Creator III

Hello.

If your input table is created like:

Table_Temp:
LOAD * INLINE [
ITEM_NO, DELIVERY_DATE, QTY
10,2010-07-31,10
10,2010-08-01,15
10,2010-08-02,5
20,2010-08-15,10
20,2010-08-16,26
20,2010-08-17,30
30,2010-08-04,20
30,2010-08-05,25
30,2010-08-06,30
];

You could create a chart with ITEM_NO as the dimension and MIN(DELIVERY_DATE) as the expression.

Let me know if this is what you are looking for.

John.

View solution in original post

3 Replies
villafuerte
Partner Ambassador
Partner Ambassador

Hi,

Here's something you can try: In your scrit, when you're loading the table use SORT BY Date ASC; in the end of the loading part

That way your table will be sorted from old to new. Then in the report just "call" the first occurence of that product in the field Date.

Hope it helps!

john_duffy
Partner - Creator III
Partner - Creator III

Hello.

If your input table is created like:

Table_Temp:
LOAD * INLINE [
ITEM_NO, DELIVERY_DATE, QTY
10,2010-07-31,10
10,2010-08-01,15
10,2010-08-02,5
20,2010-08-15,10
20,2010-08-16,26
20,2010-08-17,30
30,2010-08-04,20
30,2010-08-05,25
30,2010-08-06,30
];

You could create a chart with ITEM_NO as the dimension and MIN(DELIVERY_DATE) as the expression.

Let me know if this is what you are looking for.

John.

bengan74
Contributor III
Contributor III
Author

Worked like a charm! Thank you!