Stack CountIFS within one cell
HI,
I'm trying to produce a table that contains projects received within a year combined, then separated into regions. Below is the formula I'm using, I can only guess that it's subtracting the 345 from the 2106 instead of only counting the USA projects within the 345.
=COUNTIF({Projects In by Date}, <=DATE([Primary Column]@row, 12, 31)) - COUNTIFS({State}, <>"CAN-Canada", {State}, <>"OC-Outside North America")
Best Answer
-
Hi @TravisClem ,
I'm not sure what you are using for the formula in the "ALL" column, but if it's the same as the first section of your posted formula, I would think you are getting the wrong results as it would count every year up to the year in question (as opposed to only the year in question).
Either way, try this for the USA column.
=COUNTIFS({Projects In by Date}, <=DATE([Primary Column]@row, 12, 31), {Projects In by Date}, >=DATE([Primary Column]@row, 1, 1), {State}, <>"CAN-Canada", {State}, <>"OC-Outside North America")
The formula I have posted ensures only 1 year is looked at - use the first portion if it does turn out your other formula is incorrect.
Hope this helps,
Dave
Answers
-
Hi @TravisClem ,
I'm not sure what you are using for the formula in the "ALL" column, but if it's the same as the first section of your posted formula, I would think you are getting the wrong results as it would count every year up to the year in question (as opposed to only the year in question).
Either way, try this for the USA column.
=COUNTIFS({Projects In by Date}, <=DATE([Primary Column]@row, 12, 31), {Projects In by Date}, >=DATE([Primary Column]@row, 1, 1), {State}, <>"CAN-Canada", {State}, <>"OC-Outside North America")
The formula I have posted ensures only 1 year is looked at - use the first portion if it does turn out your other formula is incorrect.
Hope this helps,
Dave
-
That solved the issue :) Thanks @DKazatsky2 , I thought I needed to start a new COUNTIF in order to then sort by region.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63K Get Help
- 380 Global Discussions
- 212 Industry Talk
- 442 Announcements
- 4.6K Ideas & Feature Requests
- 140 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 305 Events
- 34 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!