TODAY Function with COUNTIFS
Hi
I have a formula just now which is :
=COUNTIFS({Business Case}, $Measure5, {Business Unit}, [Brand X]$3, {PROJECT STATUS}, OR(@cell = "Shipped", @cell = "In Progress"))
This is count the number on 'on time' and 'late business case's where business unit is brand X where the project status is either 'shipped' or 'in progress'.
I also wanted to add the formula to include a parameter of looking at a date column, so it includes in the count from TODAY up to 12 months from that date [-365].
I found for the TODAY function the formula is :
=COUNTIF([Date Column]:[Date Column], @cell> TODAY(-365))
I'm trying to incorporate the TODAY function into my existing formula which works, but failing - any help?
=COUNTIFS({Business Case}, $Measure5, {Business Unit}, [Brand X]$3, {PROJECT STATUS}, OR(@cell = "Shipped", @cell = "In Progress"), [BC Date]:[BC Date], @cell> TODAY(-365))
Many thanks.
Lindsay
Best Answer
-
{Business Case} {Business Unit} {Project Status}
are all references to another sheet.
[BC Date]:[BC Date]
is a reference to the current sheet.
If the current sheet doesn't have the exact same amount of rows as the referenced sheet you won't be able to do a countif incorporating both sheets using column ranges. I'm not sure what your objective is, as I haven't seen your sheet layout, but here are 2 potential solutions depending on sheet layout (posting a picture of your sheets would really help if neither of these work for you)
=if([BC Date]@row >today(-365),COUNTIFS({Business Case}, $Measure5, {Business Unit}, [Brand X]$3, {PROJECT STATUS}, OR(@cell = "Shipped", @cell = "In Progress"
or
=COUNTIFS({Business Case}, $Measure5, {Business Unit}, [Brand X]$3, {PROJECT STATUS}, OR(@cell = "Shipped", @cell = "In Progress"), {BC Date}, @cell> TODAY(-365
Answers
-
It is failing because the number of cells in each reference in your other sheet references are different than that of the same sheet reference BC Date.
-
@L@123 thanks for looking at my query!
Not too sure I understand what you mean. What you suggest the below?
=COUNTIFS({Business Case}, $Measure5, {Business Unit}, [Brand X]$3, {PROJECT STATUS}, OR(@cell = "Shipped", @cell = "In Progress"), [BC Date], @cell> TODAY(-365))
Lindsay
-
{Business Case} {Business Unit} {Project Status}
are all references to another sheet.
[BC Date]:[BC Date]
is a reference to the current sheet.
If the current sheet doesn't have the exact same amount of rows as the referenced sheet you won't be able to do a countif incorporating both sheets using column ranges. I'm not sure what your objective is, as I haven't seen your sheet layout, but here are 2 potential solutions depending on sheet layout (posting a picture of your sheets would really help if neither of these work for you)
=if([BC Date]@row >today(-365),COUNTIFS({Business Case}, $Measure5, {Business Unit}, [Brand X]$3, {PROJECT STATUS}, OR(@cell = "Shipped", @cell = "In Progress"
or
=COUNTIFS({Business Case}, $Measure5, {Business Unit}, [Brand X]$3, {PROJECT STATUS}, OR(@cell = "Shipped", @cell = "In Progress"), {BC Date}, @cell> TODAY(-365
-
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 439 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 67 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!