How do I sort parent rows without changing child rows?
In my sheet, each parent row is a different employee. Each employee has child rows for each month of the year and a YTD row that contains KPI data for each moth. When entering in data, it is helpful for me to sort the parent rows by employee names and then switch to sorting by employee numbers, based on where I am sourcing the data. When I sort the parent rows, I find that the month child rows change order messing up the chronological order in our dashboard that is connected to the sheet and the formulas for the YTD rows.
How do I sort the parent rows without changing the order of the child rows?
Answers
-
Create a field called sort, and put this formula in it:
=IF(COUNT(ANCESTORS([Primary Column]@row)) = 0, [Primary Column]@row)
If you have a date column, you can use this formula to force the children into date sort order also:
=IF(COUNT(ANCESTORS([Primary Column]@row)) = 0, [Primary Column]@row, IF(Sort@row = 1, YEAR([Date Field]@row) + RIGHT(("00" + MONTH([Date Field]@row)), 2) + RIGHT(("00" + DAY([Date Field]@row)), 2)))
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.4K Get Help
- 364 Global Discussions
- 200 Industry Talk
- 428 Announcements
- 4.4K Ideas & Feature Requests
- 137 Brandfolder
- 129 Just for fun
- 128 Community Job Board
- 446 Show & Tell
- 28 Member Spotlight
- 1 SmartStories
- 283 Events
- 35 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!