Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi team,
I am trying to create a KPI with the sum of value of the month ago
=sum({<Mes = {">=$(=MonthStart(AddMonths(Today(),-0)))<= $(=MonthEnd(AddMonths(Today(),-0)))"}>}[Picking mensual])
But, formula is sum month ago and one month more, this is, sum Aug and Sep. How can I fix it to get only the sum of Aug?
@Ari_vzla how about this since we are in Oct now and going back to Aug would need going back 2 months
=Sum({<Mes = {">=$(=Date(MonthStart(Today(), -2), 'DD.MM.YYYY'))<=$(=Date(Floor(MonthEnd(Today(), -2)), 'DD.MM.YYYY'))"}>} [Picking mensual])
use this
script create yout
Date(MonthStart(Yourdatefield), 'M-YYYY') as Mes,
frontend:
Sum({<Mes = {"$(=Date(AddMonths(Max(MonthYear), -1), 'M-YYYY'))"}>}Picking mensual])
Sorry, I am still have an error, scrip show me error after as, but I dont know how fix it
=Date(MonthStart([Mes.autoCalendar.Date]), 'M-YYYY') as Mes
frontend:
=Sum({<Mes = {"$(=Date(AddMonths(Max(MonthYear), -1), 'M-YYYY'))"}>}[Picking mensual]])
Thank you
Arieli
can you paste your date format please?
Sure, there yo go
'DD.MM.YYYY';
Thank you
Arieli
@Ari_vzla how about this since we are in Oct now and going back to Aug would need going back 2 months
=Sum({<Mes = {">=$(=Date(MonthStart(Today(), -2), 'DD.MM.YYYY'))<=$(=Date(Floor(MonthEnd(Today(), -2)), 'DD.MM.YYYY'))"}>} [Picking mensual])
Thank you so much, it works