Sum by current month ?

Hello,

I have a column of data for the whole year. I would like to create sum of this current month.
I wrote this function but it does not work well, I am looking for where the error may be:

Can anyone help?

SUM(
SELECT(
Trimp ŁP[Trimp],
AND(
([Date akt] > (TODAY() - MONTH(TODAY()))),
([Date akt] <= (TODAY() - MONTH(TODAY())))
)

)

)

Please try instead

SUM(
SELECT(
Trimp ŁP[Trimp], MONTH([Date akt])=MONTH(TODAY())

)

)

https://help.appsheet.com/en/articles/2357320-month

3 Likes

Don’t forget to include a check in your formula for the YEAR as well.

Both the year and the month must be checked otherwise you will have monthly sums for all January’s, all February’s etc.

3 Likes

Yes, good point @scott_robinson . if the data extends beyond one calendar year , you will need to include year check as well. You mentioned you have a yearful of data . In that case year check can be excluded.

3 Likes
SUM(
  SELECT(
    Trimp ŁP[Trimp],
    (EOMONTH([Date akt], 0) = EOMONTH(TODAY(), 0))
  )
)
1 Like