Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am new to qlikview and am having trouble in finding the second min value for each customer. My table is as follows:
Customer | Service Date |
---|---|
1 | 2014/09/11 |
2 | 2014/09/12 |
3 | 2014/09/12 |
1 | 2014/09/08 |
3 | 2014/09/14 |
4 | 2014/0912 |
5 | 2014/09/20 |
2 | 2014/09/15 |
2 | 2014/09/17 |
3 | 2014/09/20 |
I am able to get the minimum service date for each customer with the following expression:
=Date(Min([Session Started], [Consumer ID]), 'MM/DD/YYYY')
Now i need to find the second minimum service date for each customer. Please let me know how do we achieve this.
Thanks!!!!
Script:
TableName;
LOAD Customer,
Date(Date#([Service Date], 'YYYY/MM/DD')) AS ServiceDate
FROM
[http://community.qlik.com/thread/133850]
(html, codepage is 1252, embedded labels, table is @1);
Straight Table:
Dimension : Customer
Expression: min(ServiceDate, 2)
Hope this helps you.
Regards,
Jagan.
min(field, 2)
Hi Marco,
This does not give the desired output. I want the second minimum of the field 'Service Date' for each customer
Hi,
=aggr(min([Service date], 2), customer)
Hi Ramya,
Try like this
Straight Table:
Dimension : Customer
Expression: min([Service date], 2)
Hope this helps you.
Regards,
jagan.
Script:
TableName;
LOAD Customer,
Date(Date#([Service Date], 'YYYY/MM/DD')) AS ServiceDate
FROM
[http://community.qlik.com/thread/133850]
(html, codepage is 1252, embedded labels, table is @1);
Straight Table:
Dimension : Customer
Expression: min(ServiceDate, 2)
Hope this helps you.
Regards,
Jagan.
Check enclosed file...
Thanks for the help guys!!!