Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Comparar mes Actual con Anterior / Compare current month with Previous

Hola a todos:

Estoy buscando la formula para poder comparar el mes actual con el anterior.

Utilizo esta formula para comparar años sum({ $<añomenu={$(=only(añomenu)-1)}> } ventas), pero cambio el campo del año por el del mes y no lo calcula.

Me podéis ayudar?

Gracias

_____________________________________________________________________________________________________

Hi everyone:

I am looking for the formula to compare the current month with the previous month.

For year comparison I am using this formula sum({ $<añomenu={$(=only(añomenu)-1)}> } sales) but when I change the field to the month one, it doesn´t work.

Could anyone help me?

Many thanks

Tags (3)
4 Replies
Partner
Partner

Re: Comparar mes Actual con Anterior / Compare current month with Previous

Hi Paloma,

It would be :

Month: sum({<Month={"$(=max(Month),-1)"}>}Sales)

Month-1: sum({<Month={"$(=addMonths(max(Month),-1))"}>}Sales)

Please refer to this thread :

YTD, MTD issue

Not applicable

Re: Comparar mes Actual con Anterior / Compare current month with Previous

Hi Omar:

Many thanks for your answer but I don´t know why, It doesn´t work.

I will check everything but as I can see this is not a easy formula, I´ve seen a lot of people asking the same questión.

Do anybody know why year formula works so well and Month formula is so hard??

Regards

PD: Its the same with Day comparison....

Partner
Partner

Re: Comparar mes Actual con Anterior / Compare current month with Previous

Can you share your app?

Partner
Partner

Re: Comparar mes Actual con Anterior / Compare current month with Previous

Hello Paloma,

What if you use a YearMonth field instead of just a Month field? Does it work?

Saludos,

Ariel