Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
rociotrevial
Creator
Creator

Calculating Remaining in an Expression Grouped (CALCULAR RESTA EN UNA EXPRESION AGRUPADA

Good day,

I have a pivot table you want to calculate the monetary difference between spending one year to another in the region. (The user selects which year you wish to consult)

Something like that:

tabla.GIF

Therefore, in the Difference column for 2014 should show zero since no previous year against which to compare, in 2015 Difference must show subtract from 3.617 to 4.141.

Try it with the expression = Column (3)-column (1)

   and it did not work out.

Also try the above function: = Sum (Expense-Aggr (above (sum ({<Year =>} Expenses)), Region, Year))

nor I run,

How could I do to make me calculate the difference between spending year - spending last year ???

Thanks in advance

Translated with Google Translate - Qlik Community Administrative Team

Buen día,

Tengo una tabla pivote en la que quiero calcular la diferencia monetaria que hay entre el gasto de un año y otro en la región. (El usuario selecciona que años desea consultar)

Algo asi:


Por lo tanto, en la columna Diferencia para 2014 deberia mostrar cero puesto que no hay año previo contra el cual comparar, y en Diferencia 2015 debe mostrar el resultado de restar 3,617 - 4,141.

Intente hacerlo con la expresión = Column(3)-Column(1)

  y no funciono.

Tambien intente con la función above: =Sum(Gastos-Aggr(above(sum({<Año=>} Gastos)), Region,  Año))

y tampoco funciono,

¿Como podria hacer para lograr que me calcule la diferencia entre el gasto del año - el gasto del año anterior???

gracias de antemano

 

0 Replies