5 Replies Latest reply: Jun 21, 2017 10:06 AM by Axel Vazquez RSS

    Max(date) in set analysis

    Axel Vazquez

      Hi everyone ! I need help with this issue, because i had dates for each costumer sale, but in my table I need to get the sale of the last sale - max(date)



      This is the function wich calculates the price for the las sale :


      sum({$< _PITR_TYMTD={1}  , Origen_Dato={'Real'}, Mes=, Año=>} DCVC_TOTR_LOC_SIMP) /

      Sum({$< _PITR_TYMTD={1}  , Origen_Dato={'Real'} ,Mes= , Año=>} DCVC_PESO)/20


      But I need to set the last date, so i made the variable UltimaFecha =MAX({$<DCVC_TOTR_LOC_SIMP = {">=0"}, Mes=,Año=> } [%FECHA])


      But i tried so many ways to set that date in the set analysis for the sum, but i cant display it .

      I tried month, year, etc


      Any help will be so helpfull !


      Regards !