Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Not applicable

How to get MIN() value and its relative fields using expression?

Hi All,

I have the following problem where I am not able to get the values for a minimum date value field for each customer.

I have a table as follows:

CustomerFirst Service DateNext Service Date
109/01/201409/02/2014
109/02/201409/10/2014
109/10/2014-
209/02/201409/14/2014
209/14/2014-
309/10/201409/17/2014
309/17/2014-

I have derived the minimum of 'First Service Date' for each customer using the expression:

=Date(Min([First Service Date], [Customer]), 'MM/DD/YYYY') but not able to get the corresponding 'Next Service Date' value.

Now I want to find the minimum of 'First Service Date' for each customer and then its corresponding 'Next Service Date'. I want the output as follows:

CustomerFirst Service DateNext Service Date
109/01/201409/02/2014
209/02/201409/14/2014
309/10/201409/17/2014

Your inputs are appreciated.

Thanks!!!!!!

Tags (3)
1 Solution

Accepted Solutions

Re: How to get MIN() value and its relative fields using expression?

Try firstsortedvalue([Next Service Date],[First Service Date])


talk is cheap, supply exceeds demand
3 Replies

Re: How to get MIN() value and its relative fields using expression?

Try firstsortedvalue([Next Service Date],[First Service Date])


talk is cheap, supply exceeds demand

Re: How to get MIN() value and its relative fields using expression?

FirstSortedValue([Next Service Date],Aggr(MIN([First Service Date]),Customer))

Not applicable

Re: How to get MIN() value and its relative fields using expression?

Thank you!!!!