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

Announcements
Join us at Qlik Connect 2026 in Orlando, April 13–15: Register Here!
cancel
Showing results for 
Search instead for 
Did you mean: 
nicole_petrucelli
Contributor
Contributor

Suma acumulativa pivot columnas

Hola Amigos, tengo la siguiente duda

Debo hacer una pivot con calculos de valores y mostrar en la columna siguiente un resultado y un registro anterior..

 dia                          12                          13                          14                          15
      
Serie AAportes    1.187.000.000   
 Patrimonio anterior     1.187.000.000    1.187.280.286    1.187.560.639
0,02361%Rentabilidad                 280.286                280.352                280.419
 Patrimonio  Final    1.187.000.000    1.187.280.286    1.187.560.639    1.187.841.057

 

 

para el dia 12 tengo un monto sacado de una sql, para el dia 13 tengo que llamar al monto anterior y ponerlo en "PAtrmonio anterior" y sumar un calculo que se le hace a dicho monto (calculo de monto*seriea) y asi para todos los días...

Agradezco cualquier ayuda

4 Replies
Saravanan_Desingh

How did you get 280.286? 

1.187.000.000 x 0,02361% is not 280.286

Please check

nicole_petrucelli
Contributor
Contributor
Author

hola,

1.187.000.000 x 0,023613% =280.286.310==>280.286.310/1000=280.286

 

Muchas gracias..

Adjunto qvf 

 

🙂

Saravanan_Desingh

I just tried something. Please check.

tab1:
LOAD RecID, Aportes, [Serie A], RangeSum(If(RecID=1,Aportes,Null()),Peek([Patrimonio anterior]),Peek([Patrimonio anterior])*[Serie A]) As [Patrimonio anterior], dia,
	 Peek([Patrimonio anterior])*[Serie A] As Rentabilidad;
LOAD RecNo() As RecID, Aportes, [Serie A], dia+IterNo()-1 As dia
While dia+IterNo()-1<=15;
LOAD * INLINE [
    Aportes, Serie A, dia
    1187000000, 0.02361, 12
];
Saravanan_Desingh

Output.

commQV78.PNG