Auto Numbering based on Impact and Date

This is a follow up to my previously posted question.
I am trying to number just the gap items, but all the high impact should come first in date order, and then medium impact in date order continuing. I was able to get it to start over the count when the impact changes, but I would like it to continue and update if a new high impact item is added at a later date.
Green Column is what it should be
Test #
=IF(OR(ISBLANK([Date Added]@row), Category@row <> "Gap Item"), "", COUNTIFS([Impact Value]:[Impact Value], [Impact Value]@row, [Date Sequence]:[Date Sequence], <=[Date Sequence]@row))
Impact #
=IF(ISBLANK([Date Added]@row), "", IF(Category@row <> "Gap Item", "", COUNTIFS(Category:Category, Category@row, [Impact Sequence]:[Impact Sequence], <=[Impact Sequence]@row)))
Date # (original formula)
=IF(OR(ISBLANK([Date Added]@row), Category@row <> "Gap Item"), "", COUNTIFS(Category:Category, Category@row, [Date Sequence]:[Date Sequence], <=[Date Sequence]@row))
Answers
-
Hello @Diana36,
I was able to get it to be ordered based on the Impact and then date.First for the dates, I created a new column to calculate the age.
=TODAY()-[Date Added]@rowThen I created 3 new rows to rank the Impacts based on the Age of the row. To make them go in order (High, Medium, Low), I just added them to the Max of the previous Impact Rank.
High
=IFERROR(RANKEQ(Days@row, COLLECT(Days:Days, Category:Category, "Gap Item", Impact:Impact, "High"), 0), "")Medium
=IFERROR(MAX(High:High) + RANKEQ(Days@row, COLLECT(Days:Days, Category:Category, "Gap Item", Impact:Impact, "Medium"), 0), "")Low
=IFERROR(MAX(Medium:Medium) + RANKEQ(Days@row, COLLECT(Days:Days, Category:Category, "Gap Item", Impact:Impact, "Low"), 0), "")Then I just joined them all together to get the combined order numbering.
=JOIN(High@row:Low@row)It will adjust the order if you add item later based on the Date and Impact.
Let me know if this works for you!
Justin Yokoi
Senior Consultant | Smartsheet Development
Email: info@primeconsulting.com
Follow us onLinkedIn!
Help Article Resources
Categories
Check out the Formula Handbook template!