It would be helpful to be able to get values of GRANDCHILDREN. The function would accept two arguments such that:
- arg1: numerical value, which identifies the child level.
- arg2: boolean, to indicate inclusivity(TRUE) or exclusivity(FALSE) of next level (up or down the hierarchy).
- arg3 [optional]: boolean, to indicate inclusivity up(TRUE) or down(FALSE) the hierarchy.
For instance, in a hierarchy with 5+ levels of indentation, you would be able to use SUM(GRANDCHILDREN(3, FALSE)) and you would SUM all values of 3rd generation exclusively.
Alternatively, SUM(GRANDCHILDREN(3, TRUE, TRUE)) and get the SUM of all values 3rd generation and down (4th, 5th gen).