1 | |  | a |
| 1 | 20 | 1 | 1 | | | 1 | |
2 | |  | b |
| 2 | 16 | 1 | | 1 | | 1 | a |
3 | | 3 | 5 | 2 | | | 2 | 2 | b |
4 | | 3 | 8 | 1 | | | 1 | 1 | b |
5 | | 3 | 3 | 3 | | | 3 | 3 | b |
6 | | 2 | 1 | 3 | | 3 | | 3 | a |
7 | | 2 | 3 | 2 | | 2 | | 2 | a |
8 | |  | h |
| 1 | 6 | 2 | 2 | | | 2 | |
9 | | 2 | 1 | 3 | | 3 | | 3 | h |
10 | | 2 | 2 | 2 | | 2 | | 2 | h |
11 | | 2 | 3 | 1 | | 1 | | 1 | h |
12 | | | | | | | | | |
13 | | | | | for illustration, not needed | for illustration, not needed | for illustration, not needed | | |
14 | | =COUNT(ANCESTORS (Category@row)) + 1 | | =RANKEQ(Value@row, COLLECT(Value:Value, Hierarchy:Hierarchy, Hierarchy@row, Helper:Helper, Helper@row), 0) | =IF($Hierarchy@row = 1, $[Rank without Helper]@row, "") | =IF($Hierarchy@row = 2, $[Rank without Helper]@row, "") | =IF($Hierarchy@row = 3, $[Rank without Helper]@row, "") | =RANKEQ(Value@row, COLLECT(Value:Value, Hierarchy:Hierarchy, Hierarchy@row, Helper:Helper, Helper@row), 0) | =PARENT(Category@row) |