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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
pgalvezt
Specialist
Specialist

Obtain Last Year (Object)

Hello,

I´m Trying to obtain last year with my formula but it is not working,

Actual Year is 3.689 I need to obtain 2.264, Instead  1.907.

I put an example for better comprehenssion,

Thanks!

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

May be this:

= Num((Num(Sum({< Año = {$(xAñoAnt)}>}Aggr(

Num(Num(Sum({< Año = {$(xAñoAnt)}>}ValorOpeMonedaCorregidoUpdate_Consumo/Divisor),'#.##0')*(UFmax)/Sum({< Año = {$(xAñoAnt)}>}CantidadNeta_Consumo),'#.##0') ,CodFamiliaProducto_Consumo,DescrFamiliaProducto_Consumo)),'#.##0')) /

Count({< Año = {$(xAñoAnt)}>}Distinct(CodFamiliaProducto_Consumo)) ,'#.##0')

View solution in original post

2 Replies
sunny_talwar
MVP
MVP

May be this:

= Num((Num(Sum({< Año = {$(xAñoAnt)}>}Aggr(

Num(Num(Sum({< Año = {$(xAñoAnt)}>}ValorOpeMonedaCorregidoUpdate_Consumo/Divisor),'#.##0')*(UFmax)/Sum({< Año = {$(xAñoAnt)}>}CantidadNeta_Consumo),'#.##0') ,CodFamiliaProducto_Consumo,DescrFamiliaProducto_Consumo)),'#.##0')) /

Count({< Año = {$(xAñoAnt)}>}Distinct(CodFamiliaProducto_Consumo)) ,'#.##0')

pgalvezt
Specialist
Specialist
Author

Perfect Thank you Sunny!