I have been progressing well and solved many complex formulae but this simple one has me
I am trying to return the closest parent for the equipment ID when i have other interceding hierarchy levels between the true parent and the Equipment ID. I keep getting a syntax error and for the life of me cannot see it.
=IF(Heirarchy@row = 5, INDEX(ANCESTORS(Heirarchy@row, 2), [Equipment ID]@row), IF(Heirarchy@row > 5, [Parent]@row, "")) is the formula used in the above snip.
Answers
-
Looks like you have a misplaced parenthesis. Try moving the one from after [Equipment ID]@row to after the HIerarchy@row in the ANCESTORS function.
-
I tried that and still get syntax error
-
I see what's going on. Try this:
=IF(Hierarchy@row< 5, [Equipment ID]@row, IF(Heirarchy@row = 5, INDEX(ANCESTORS(Heirarchy@row), 2)))
Although you may want to INDEX [Equipment ID]@row instead of Hierarchy@row.
-
Apologize for delay in responding Paul, thanks for the heads up I got it to work using the following
=IF(Heirarchy@row > 5, Parent@row, IF(Heirarchy@row = 5, INDEX(ANCESTORS([Equipment ID]@row), 3), "")) needed to use 3 for the row index t get the right answer.
Thanks Again
Chris
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
- 494 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!