Using Boolean Operators in Countif with Dates
Hello. I'm not sure why my formula isn't working. I'm guessing the issue is my syntax but I don't see where it is wrong, if that is the issue.
I'm trying to get countif to count the number of rows with a date greater than 1/1/20. The formula does return a value but that value is 0. Here is the formula in case it's hard to see in the screenshot
=COUNTIF({Sofie's Org[TD Trans Date]}, ">" + DATE(2020, 1, 1))
I included a screenshot of the reference column. Clearly there are some dates that are greater than 1/1/20. The reference column is set to date column type.
When I try this in Excel I get a value of 3394 with the analogous formula =COUNTIF(Table1[TD Trans Date],">"&DATE(2020,1,1)).
Any help would be appreciated
Best Answer
-
Hello. After a bit more research I found the solution.
It seems using @cell in formula instead of concatenating the ">" to the output of the date function is the way to go (btw what do we call @cell like elements? It wouldn't be formula. Maybe it's calling a function?)
Anyway, here is the syntax to use based on my initial question.
=COUNTIF({Sofie's Org[TD Trans Date]}, @cell > DATE(2020, 1, 1))
Answers
-
Hello. After a bit more research I found the solution.
It seems using @cell in formula instead of concatenating the ">" to the output of the date function is the way to go (btw what do we call @cell like elements? It wouldn't be formula. Maybe it's calling a function?)
Anyway, here is the syntax to use based on my initial question.
=COUNTIF({Sofie's Org[TD Trans Date]}, @cell > DATE(2020, 1, 1))
-
I'm glad you found a solution! Thanks for posting it to help other members.
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!