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

Problema: Tabla pivotante con Set Analisys

Buenas tardes, es la primera vez que posteo en este foro, la mayoria de las veces no he tenido que hacerlo porque ante cualquier duda siempre he podido resolverla a través de aqui y de la cantidad de información con la que manejarse...

El caso es que necesito hacer una comparativa o diferencial entre el mes actual y el anterior, para lo cual monto la siguiente formula.

sum({<Mes_FechaValor = {$(=month(addmonths(FechaValor,-1)))},Año_FechaValor={$(=year(addmonths(FechaValor,-1)))}>} Importe)

Mi idea es poder ver en dos columnas los ingresos del mes actual y del anterior una junto a la otra, si solo pongo el mes me da la misma cantidad que el mes actual y si añado el año me sale 0.

Gracias de antemano.

Good afternoon, is the first time I posted them on this forum, most of the time I had to do not have any doubts because I was always able to resolve it through here and the amount of information to be handled ...

Anyway, I need to do a comparison or differential between the current month and the previous, for which amount the following formula.

sum({<Mes_FechaValor = {$(=month(addmonths(FechaValor,-1)))},Año_FechaValor={$(=year(addmonths(FechaValor,-1)))}>} Importe)

I like see two columns in revenue for the current month and the previous one beside the other, just put the month if I get the same amount as the current month and if I add the year I get 0.


Thanks!

11 Replies
Not applicable
Author

Buenos dias Hector, he hecho pruebas con la funcion above y no es valida si por ejemplo tengo la tabla sin expandir porque hace un sumatorio...

Te adjunto un ejemplo de mas o menos lo que quiero hacer, espero de nuevo tu ayuda.

Not applicable
Author

Creo que el problema radica en lo siguiente,

En la pestaña en la que utilizo el set analysis he ejecutado una macro que filtra el mes y el año actual y no los anteriores, si en vez de usar el signo $ uso el 1 no ignora la dimension y me lo coloca en el mes anterior el resultado con esta formula...


Sum ( {1 < Estados_Cartera={Facturado}, FechaValor={">=$(=addmonths(monthstart(max(FechaValor)),-1)) <=$(=addmonths(monthend(max(FechaValor)),-1))"}>} Importe)