15 Replies Latest reply: Jul 31, 2018 1:44 PM by Gaurav Atluri RSS

    Count of Max date

    Gaurav Atluri



      Can't figure out this simple problem:


      LOAD id, Date#(date) as date, status INLINE [
      id, date, Area
      A, 01/01/2018, 18

      B, 02/02/2018, 25

      B, 02/03/2018, 26
      C, 03/03/2018, 31
      D, 04/04/2018, 42

      D,04/05/2018, 43    

      D, 04/05/2018, 44];

      I'm trying to create an expression to:

      - count (Area) where Date = maxDate for eg: for id 'D' there are three dates, trying to get count when date is max which is 04/05/2018. Same for id B where date is maxdate which is 05/03/2018. where date in format of MM/DD/YYYY.



      Would appreaciate the help.