 # Count all repeats columns if the date is in this month or 5 days before today

i need to Count all columns if the date is in this month or 5 days before today and if the problem from database is equal the problem from the row.
so i’m using this formula:

(count(select(visao[problema],AND(MONTH([abertura])=“11”,[problema]=[_thisrow].[problema]))
))

but i dont know how to put in formula this month or 5days before today
i need to put [abertura]=this month
or
count if is 5days before today

count(select(visao[problema],AND(MONTH([abertura])=MONTH (TODAY ()), [abertura]>=(TODAY() - 5),[problema]=[_thisrow].[problema]))
))

Hi @Johny_Freitas, could you please try an expression something like above.

Instead of AND, should it be with OR? Like OR(EOMONTH([abertura],0)=EOMONTH(TODAY(),0),[abertura]>=(TODAY()-5),…

Hi @Aleksi,
You are correct. It should be OR instead of an AND . @Johny_Freitas has mentioned OR in his requirement.

Doesn’t worked:
i’ve tried with:
(EOMONTH([abertura],0)=EOMONTH(TODAY(),0)
MONTH([abertura])=MONTH (TODAY ())
[abertura]>=(TODAY() - 5)

count should be “4”

i do it with another virtual column to get the month or days: