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?
First of all, what is the expression used for vMaxWeek
When the variable expression is 1 use Empleado.Semana={$(vMaxWeek)}
When the variable expression is 2 use Empleado.Semana={$(=$(vMaxWeek))}
This is because the first is already evaluated and is 46, the second contains only the logic and has to be evaluated.
Also if you don't set the label of a expression you can read the outcome of the statement. Very usefull if you use several variables and youre not sure if the syntax is correct.
Also like swuehl states, please share what does work, and what you've tested.
Try this:
Sum({<Empleado.Semana={$(=$(vMaxWeek))},Empleado.fechaRetiro={">=01/01/$(vAñoActual)<=31/12/$(vAñoActual)"},Empleado.Año={$(vAñoActual)},Calendario.AnoNomina=>}1)
Not Working :s
What about this:
Sum({<Empleado.Semana={'$(=$(vMaxWeek))'},Empleado.fechaRetiro={">=01/01/$(vAñoActual)<=31/12/$(vAñoActual)"},Empleado.Año={$(vAñoActual)},Calendario.AnoNomina=>}1)
What about
Sum({<Empleado.Semana={$(=Max(Empleado.Semana))},Empleado.fechaRetiro={">=01/01/$(vAñoActual)<=31/12/$(vAñoActual)"},Empleado.Año={$(vAñoActual)},Calendario.AnoNomina=>}1)
Not working
Not Working
Not working is not very helpful...
Do you get a correct value when you input the 46 as constant:
Sum({<Empleado.Semana={46},Empleado.fechaRetiro={">=01/01/$(vAñoActual)<=31/12/$(vAñoActual)"},Empleado.Año={$(vAñoActual)},Calendario.AnoNomina=>}1)
I wonder if you really want to sum a constant 1 here. What do you get returned (e.g. when using
Sum({<Empleado.fechaRetiro={">=01/01/$(vAñoActual)<=31/12/$(vAñoActual)"},Empleado.Año={$(vAñoActual)},Calendario.AnoNomina=>} 1)
)?
Could you upload a small sample QVW and your requested result?
First of all, what is the expression used for vMaxWeek
When the variable expression is 1 use Empleado.Semana={$(vMaxWeek)}
When the variable expression is 2 use Empleado.Semana={$(=$(vMaxWeek))}
This is because the first is already evaluated and is 46, the second contains only the logic and has to be evaluated.
Also if you don't set the label of a expression you can read the outcome of the statement. Very usefull if you use several variables and youre not sure if the syntax is correct.
Also like swuehl states, please share what does work, and what you've tested.
Hi, You're rigth, "not working" is not helpful.
Look, This is the result I should get.
The idea is to show the position of a person when it leaves the company. in this case a person had a position "EQ. ATENC.CLIENTES ..." from week 1 through week 44, then changed his position and went on to "dept. CANALAES FACE .." in week 45 and 46. This person left the company at week 46 (the last record). Then I need only the first record of the original image.
Here the link to the test.qwv: test.qvw