Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hola,
Estoy teniendo un problema con un set analisis.
Quiero calcular el mes anterior de un campo. Mi fecha es formato YYYY-MM y el campo es "Periodo".
sum( {$<Periodo={"<=$(=date(Periodo-1))>"}>} CampoASumar)
Alguien me puede corregir esto?
Gracias.
create variable
Periodo_new =
=Makedate(Year(Date#(Periodo,'YYYY-MM')),Month(Date#(Periodo,'YYYY-MM')),1)
then the New Set analysis :
sum( {$<Periodo_new={"<=$(=Addmonths(Periodo_new,-1))>"}>} CampoASumar)
Hi, thanks for the quick answer.
I tried what you said, but its giving me back the value of the current month, not the value of the month before.
ah ok
may be
=Sum({<Periodo_new= {"$(=Addmonths(Periodo_new,-1))"}>} CampoASumar)
may be this
sum( {$<Periodo={"<=$(=date(addmonths(max(Periodo),-1),'YYYY-MM'))>"}>} CampoASumar)