JOIN DISTINCT COLLECT *DESCENDANTS*
Hi, I am used to using this formula: =JOIN(DISTINCT(COLLECT(CHILDREN(), CHILDREN(), <>"")), CHAR(10))
to roll up unique children but have replaced the 'children' with 'descendants':
=JOIN(DISTINCT(COLLECT(DESCENDANTS(), DESCENDANTS(), <>"Total")), CHAR(10))
but it's returning both children and descendants?
I only want descendants?
Any ideas on how to solve welcome. thank you!
Answers
-
Hello @melimob,
What do you consider to be a descendant that is not a child?
If you want to collect only a specific hierarchy level I would make a helper column with a formula that outputs some value based on a hierarchy evaluation. You could then collect based on that value.
For example, if you have three levels of hierarchy:
- Grandparent
- Parent
- Children
And you only want to pull in level 2 (Parents). You could make a new column with formula
=COUNT(ANCESTORS()).
This will return 1 for the 2nd level. In your formula you can then use:=JOIN(DISTINCT(COLLECT(DESCENDANTS(), DESCENDANTS(), <>"Total", [Helper Column]:[Helper Column], 1)), CHAR(10))
School of Sheets (Smartsheet Partner)
If my answer helped please accept and react w/💡Insightful, ⬆️ Vote Up, ❤️Awesome!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.3K Get Help
- 423 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 143 Just for fun
- 59 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!