@RickyTillson@MathisG, I am still collecting my full thoughts on this but I could see you leveraging a Hierarchy system module that defines each level of the hierarchy. Here is a great article that shows you how to setup a hierarchy system module.
What I would advise from here is come up with some logic that says in a 3rd line item, “If hierarchy level = Child 2, then Parent - Child1 else 0” then have a “final line item” that says, “If Parent then take parent line item, else if child 1 level then take child 1 line item else child 2 line item.”
Hope this helps. Let me know if you need help clarifying any step.
The hierarchy levels System module helps with this exact scenario. I am assuming your module is dimensionalized by Child 2.
What you would do is you need some conditionals that identify the level of hierarchy of Child 2, Child 1, and Parent.
Your formulas would be:
1) Line item 1= Total Staff
2) Line item 2= IF SYS Hiearchy Levels.L3 = 3 THEN Parent-Child 1 Else 0.
3) Line item 3= IF SYS Hierarchy Levels.L3>3 THEN (Child 1 formula) ELSE 0.
The summary methods on Line Items 2 and 3 will need to be formula. Then you can have a final line item which says IF SYS Hierarchy Levels.L3 THEN Line Item 2 ELSE IF SYS Hierarchy Levels.L3 = 2 THEN Line Item 3 ELSE Line Item 1.
@JaredDolich - tagging you here if you have any other suggestions or if you agree with the above.
I think you can also leverage a system lookup module that has a list formatted line item with your child list. For that line item you will select the Child item you want to leverage for looking up (in this case you would choose the Child1 value).
Then in your Calculation module you can use that constant to lookup the value of a line item for Child1 regardless of the dimension you are in.