HAS Formula Returning Wrong Results
Hey Community,
I've created a formula to count, collect, and return results based on some criteria. I have also created a report that gives me what I'm looking for. At the report level the results come back correctly, but in my formula to just get a count. It does not.
=COUNT(COLLECT({Intensity}, {TargetDate1}, >-30, {TargetDate1}, <0, {Region}, HAS(@cell, "APAC")))
The target date reference is just a calculation between a start date and end date. What I believe is giving me the incorrect value is the has formula for the region. The above formula is returning 2 as the results. Where as the report created with the similar filters is returning 5 results. So somehow I'm missing 3 results and unsure on what would cause the difference. I do have 3 different regions that could be chosen from the dropdown (Below screenshot).
Filter on report below. [CORRECT AMOUNT RETURN]
Answers
-
Why not use COUNTIFS instead of COUNT and COLLECT? This will count the number of rows where all three of these conditions are true:
=COUNTIFS({TargetDate1}, >-30, {TargetDate1}, <0, {Region}, HAS(@cell, "APAC"))
Regards,
Jeff Reisman
Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages
If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.2K Get Help
- 445 Global Discussions
- 143 Industry Talk
- 476 Announcements
- 5K Ideas & Feature Requests
- 84 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!