See the attached for a solution. PREVIOUS_VALUE is used to create the "Used Hierarchy List". Then in the "Total Top Level Members" calc, the CONTAINS() function is used to identify if the particular Component is found within the hierarchy - if not, then it must be a top-level (superceding) member and so it is counted in the WINDOW_SUM. The Total Top Level Members calc assumes that the components within the PIN are sorted by position in hierarchy (descending), if they aren't then a differnet
The Compute Using for all calcs is set to Component. Note that I wrapped the Hierachy$_Hierarchy field in ATTR() so it would be ignored for partiitioning and addresssing in the table calcs.
Hierarchy jtd edit.twbx.zip 21.0 KB