12 Replies Latest reply: Dec 30, 2015 7:53 AM by sebastian londono RSS

    Get Max of a possible list selection

    sebastian londono

      Hi everyone

       

      I need to get the Max in a possible list.

      Something like this:

      Captura.PNG

      I need to get that '46' and put in into my set analysis. In this case is 46 but there may be other cases in which is other number.

      (In Orange the important)

       

      I tried this : Sum({<max(Empleado.Semana= p(Empleado.Semana)) ,Empleado.fechaRetiro={">=01/01/$(vAñoActual)<=31/12/$(vAñoActual)"},Empleado.Año={$(vAñoActual)},Calendario.AnoNomina=>}1)

       

      Tried this too: vMaxWeek = Max(Empleado.Semana) ....This get the '46' but when i put it into the set analysis it doesnt work

      Sum({<Empleado.Semana={$(vMaxWeek)},Empleado.fechaRetiro={">=01/01/$(vAñoActual)<=31/12/$(vAñoActual)"},Empleado.Año={$(vAñoActual)},Calendario.AnoNomina=>}1)


      Any idea?