Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone
I need to get the Max in a possible list.
Something like this:
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?
So much thanks.
I just chage the variable from Max(Week) to =Max(Week) and is working correctly.
Both Working:
When the variable expression is 1 use Empleado.Semana={$(vMaxWeek)}
When the variable expression is 2 use Empleado.Semana={$(=$(vMaxWeek))}
Thanks to all.
Didn't I already give you the second expression above? -> Re: Get Max of a possible list selection
Absolutely
But it was necesary to adjust the variable putting "=" before the expression.