3 Replies Latest reply: Nov 18, 2016 2:12 AM by Shraddha Gajare RSS

    How to obtain the latest 2 dates from a list of dates

    KANCHANA DORAISWAMY

      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 :

       

      NoTest DateMachine ConfigTest TypeTest StreamTotal DatasetsFailures
      103/24/2016xxxxxxxxx123415
      204/07/2016xxxxxxxxx567810
      308/09/2016xxxxxxxxx90311
      410/09/2016xxxxxxxxx25550
      511/17/2016xxxxxxxxx987830

       

      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!