Summarizing / aggregating in parent-child hierarchies
Hi, I'm trying to make a report with a slicer that shows employee headcount plan for departments. There are many departments in different hierarchies.
My "headcount plan" table looks like this:
IT - Web Development
1 | 2
HR - Training
4 | 5
HR - Strategy
4 | 6
The slicer I have shows departments in a hierarchical fashion. There are 4 levels in the hierarchy. I used a PATHITEM DAX measure to flatten the hierarchy, which I use for the slicer.
When I just sum all of the Headcount Plan using SUM(Table[Headcount Plan]), it sums child values on top of the parent values, leading to inaccuracy and added values. I want to show it as a card that changes its value upon a filter is applied.
How would one aggregate the Headcount Plan column without summing child values on top of parent values?