Current Month Formula


#1

Hello,

I am looking for some assistance with a current month / count if formula.

It’s a (numeric) field on an entry that will count subtable entries if they were made in the current month.
This is what I have tried, but it returned with 0 instead of 2:
COUNTIF(H37,MONTH(TODAY()),H37)

I have been successful with other formulas to calculate subtable entries - MAX(H37) returns the most recent booking date. And TODAY() works in another field I have. I have just never used a current month or countif in Ragic yet.

Thanks!


#2

Hi,

Since we don’t know the field type of other information of your H37 field, would you mind to share a screenshot or send a support ticket so that we can have a look of your current design?


#3

What do you mean by field type? Other than it being numeric.

image


#4

Hi,

It looks like your H37 is a standard date field that will return a full date. For example, 02/04/2020.

Then, your COUNTIF() will never be matched since MONTH(TODAY()) only returns a number, from 1 to 12, while your H37 is a full date.

I would suggest creating another subtable field, I37, with formula MONTH(H37). Then, change the COUNTIF() as below:

COUNTIF(I37,MONTH(TODAY()),I37)


#5

Oh I see. I thought that it would count any dates that fall under that month.

Thank you, I will try that solution.


#6

This worked, thank you!