Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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

4 Replies
OmarBenSalem

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
Author

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....

OmarBenSalem

Can you share your app?

arieidel
Partner - Creator II
Partner - Creator II

Hello Paloma,

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

Saludos,

Ariel