Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am using Qliksense 3.0. I have an excel sheet containing data arranged according to dates in the format MM/DD/YYYY. How can I extract the latest 2 dates from this list? For example, when my data is arranged like this :
No | Test Date | Machine Config | Test Type | Test Stream | Total Datasets | Failures |
---|---|---|---|---|---|---|
1 | 03/24/2016 | xxx | xxx | xxx | 1234 | 15 |
2 | 04/07/2016 | xxx | xxx | xxx | 5678 | 10 |
3 | 08/09/2016 | xxx | xxx | xxx | 9031 | 1 |
4 | 10/09/2016 | xxx | xxx | xxx | 2555 | 0 |
5 | 11/17/2016 | xxx | xxx | xxx | 9878 | 30 |
The statement :
LOAD
Date(max("Test Date")) as MaxDate
Results in MaxDate => 11/17/2016
But how do I get the last 2 latest dates, i.e in this case 11/17/2016 and 10/09/2016 ?
Any help is appreciated!
Try:
LOAD
Date(max("Test Date")) as MaxDate
From Excel;
Load
Date(max("Test Date")) as MaxDate2
From Excel
where not exists(MaxDate,Test Date")
Try:
LOAD
Date(max("Test Date")) as MaxDate
From Excel;
Load
Date(max("Test Date")) as MaxDate2
From Excel
where not exists(MaxDate,Test Date")
Awesome Shraddha, this works. Thanks much!
The opening quote was missing, that's the only change needed in your statement, i.e
where not exists(MaxDate,"Test Date")
Ohh yes.
Thank you for correction.