Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
slondono
Partner - Creator II
Partner - Creator II

Get Max of a possible list selection

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?

12 Replies
slondono
Partner - Creator II
Partner - Creator II
Author

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.

sunny_talwar

Didn't I already give you the second expression above? -> Re: Get Max of a possible list selection

slondono
Partner - Creator II
Partner - Creator II
Author

Absolutely

But it was necesary to adjust the variable putting "=" before the expression.