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
- 63.5K Get Help
- 402 Global Discussions
- 213 Industry Talk
- 450 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 135 Just for fun
- 56 Community Job Board
- 454 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 296 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!