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())))
)

)

)

 

 

Solved Solved
0 4 210
1 ACCEPTED SOLUTION

Please try instead

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

 )

)

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

View solution in original post

4 REPLIES 4

Please try instead

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

 )

)

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

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.

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.

Steve
Platinum 4
Platinum 4
SUM(
  SELECT(
    Trimp ŁP[Trimp],
    (EOMONTH([Date akt], 0) = EOMONTH(TODAY(), 0))
  )
)
Top Labels in this Space