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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Return value based on min from different column

Hi all,

let's say I have a table:

Item (key)QuantityDelivery
12345101.12.2016
12345505.12.2016
2345630

15.12.2016

2345653.12.2016

I need to select data per Item from Quantity column where Delivery is lowest.

Target is to get following in chart table:

ItemQuantityDelivery
12345101.12.2016
234565

3.12.2016

Is it possible via set analyses or something, or do I have to prepare the data in script, using for example mapping?

Select lowest Delivery is simple, but how do I return data from different column once I found lowest date?

Following shows script error:

only({<[Delivery]={min([Delivery])}>},Quantity)

1 Solution

Accepted Solutions
sunny_talwar

Just a slight modification. If you want this based on minimum value of delivery, I would not use -Delivery

FirstSortedValue(Quantity, Delivery)

View solution in original post

6 Replies
marcus_sommer

Try it with: firstsortedvalue(Quantity, -Delivery) where Delivery must be a real date respectively numeric.

- Marcus

sunny_talwar

Just a slight modification. If you want this based on minimum value of delivery, I would not use -Delivery

FirstSortedValue(Quantity, Delivery)

MK_QSL
MVP
MVP

For 23456 MinDate mentioned is 3.12.2015 Which is not in Source Data.. !!

sunny_talwar

Hahahahaha good one

Not applicable
Author

Thank you, I updated it

Not applicable
Author

Thank you for the hint