3 Replies Latest reply: Aug 11, 2016 3:05 PM by Stefan Wühl RSS

    count latests records

    JUAN villalva

      Hi

       

      I have theses fields

       

      serial_cve: the serial number of our devices

      fec_commServ: the date a message arrive to our server

      EV2OFC_OTA_Reason_General_P1081: the status we want to count

       

      We want to count how many latest status we have

       

      I just could calculate the latest status for each serial using:

      firstsortedvalue(EV2OFC_OTA_Reason_General_P1081,-fec_commServ,1)

      for the above function I used of course as dimension: serial_cve

       

      Now I want to count the quantity of each status EV2OFC_OTA_Reason_General_P1081

      for that I need to set as dimension : EV2OFC_OTA_Reason_General_P1081

      then I have no idea how to count the latest ones:

      I tried

      count(firstsortedvalue(EV2OFC_OTA_Reason_General_P1081,-fec_commServ,1))

      of course it looks wrong but I have no clue


      thanks!!!!