How do I fix my Corrective Actions ID number to count only the ancestors created under the status?
As of right now I have this as my formula
=IF(COUNT(ANCESTORS(Status@row)) < 1, "", YEAR([Date Generated]@row, 2) - 2000 + "-" + IF(COUNTIF(Status@row, Status@row) < 10, "000" + COUNTIF(Status@row, Status@row), IF(COUNTIF(Status@row, Status@row) < 100, "00" + COUNTIF(Status@row, Status@row), IF(COUNTIF(Status@row, Status@row) < 1000, "0" + COUNTIF(Status@row, Status@row)))))
Whenever I attempt to add a reference point for the count to begin (ie: Status$1: ) I receive a syntax error. The goal is to generate a unique ID code for every ancestor one level in.
Though it seems I may have the additional problem of once it needs moved to a separate lead ancestor the ID codes would shift. Is there a better way to go about what I am attempting?
The ID code needs to maintain its original formatting of "YY-####.##" (ex: 23-0001.01)
YY - (ex: 23) two digit year
####- (ex: 0001) Count number reset year to year
.##- (ex: .01) The iteration upon the current project (or ancestors of the original unique ID)
Would this be easier to utilize individually calculated columns and combined into one?
Answers
-
Hi @xX4Zero4Xx
Here's how you would reference "from the top row to this current row" in your formula:
COUNTIF(Status$1:Status@row, Status@row)
So in your case:
=IF(COUNT(ANCESTORS(Status@row)) < 1, "", YEAR([Date Generated]@row, 2) - 2000 + "-" + IF(COUNTIF(Status$1:Status@row, Status@row) < 10, "000" + COUNTIF(Status$1:Status@row, Status@row), IF(COUNTIF(Status$1:Status@row, Status@row) < 100, "00" + COUNTIF(Status$1:Status@row, Status@row), IF(COUNTIF(Status$1:Status@row, Status@row) < 1000, "0" + COUNTIF(Status$1:Status@row, Status@row)))))
Let me know if this resolves your issue!
Cheers,
Genevieve
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.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 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!