Index, Match, Max, Collect - Close , but off when same max dates (yet different criteria)
I am stumped and can't process how to adjust this formula when same dates are present in the dataset - I believe the collection is choosing the first return only-- rather than the field that should be collected based on the criteria. Match should be gathering the row - - but really unsure here.
=INDEX({Title}, MATCH(MAX(COLLECT({Date}, {Criteria 1}, 1, {Criteria 2}, 1)), {Date}, 0), 1)
Eg Dataset :
Same Max Date
2/21/2019 /Returned Index(title) /Criteria 1-Null /Criteria 2-Null
2/21/2019/Unreturned Index(title) / Criteria 2-Meets/Criteria 2-Meets
Answers
-
Hi @bloux
The MATCH Function works like this:
MATCH(Value to Match, Range to Search, 0)
This means that in the first part, the Value to Match, you're filtering by Criteria 1 and Criteria 2, so it finds 2/21/2019 as the Value.
However in the second part, the Range to Search, there are no other criteria listed to filter by, so it will find the first time that 2/21/2019 appears in the range. Does that make sense? We'll want to add in a COLLECT function in the Range portion of the formula, too:
=INDEX({Title}, MATCH(MAX(COLLECT({Date}, {Criteria 1}, 1, {Criteria 2}, 1)), COLLECT({Date}, {Criteria 1}, 1, {Criteria 2}, 1), 0), 1)
Cheers!
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
Wow yes, thank you for thinking that one through! Was not aware that the formulas could be used to filter the range like that also! Thanks so much Genevieve!
-
No problem! 🙂
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
- 139 Industry Talk
- 471 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!