Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

View all the Fabric Data Days sessions on demand. View schedule

Reply
InsHunter
Helper II
Helper II

Reconcilation of values between parent and child -Calculated column

Hi,
Request your support on formulating the correct DAX formula for caclulated column which calculates the value of sum of the children of that Node. There are more than five levels of parent ,child relation ship.Reconciliation need to happen for all parents with their immediate next level children. The generated table is as below 

InsHunter_0-1690894563272.png

My dax formula for the calculated column "Units_Expected" is not giving values correctly as its aggregating totally. In this sample only three levels are shown but acutal data has more levels. I request a generic formula for any number of levels.

Units_Expected =

if(
    Units_Reconciliation_Table[Node Type]="level1",
    sumx(
        FILTER(Units_Reconciliation_Table,PATHITEM(Units_Reconciliation_Table[Entity Path],2,INTEGER) =Units_Reconciliation_Table[Child Node ID]),
        Units_Reconciliation_Table[Units_Actuals]),
        (  
   
    if(Units_Reconciliation_Table[Node Type]="level2",
    sumx(
        FILTER(Units_Reconciliation_Table,        
        AND(
        PATHITEM(Units_Reconciliation_Table[Entity Path],3,INTEGER) =Units_Reconciliation_Table[Child Node ID],
        PATHITEM(Units_Reconciliation_Table[Entity Path],2,INTEGER) =Units_Reconciliation_Table[Immediate_Parent])),      

        Units_Reconciliation_Table[Units_Actuals]),
        if(Units_Reconciliation_Table[Node Type]="level3",
    sumx(
        FILTER(Units_Reconciliation_Table,PATHITEM(Units_Reconciliation_Table[Entity Path],4,INTEGER) =Units_Reconciliation_Table[Child Node ID]),
        Units_Reconciliation_Table[Units_Actuals]),
    if(Units_Reconciliation_Table[Node Type]="level4",
    sumx(
        FILTER(Units_Reconciliation_Table,PATHITEM(Units_Reconciliation_Table[Entity Path],5,INTEGER) =Units_Reconciliation_Table[Child Node ID]),
        Units_Reconciliation_Table[Units_Actuals])
    )
    )
    )))

Appreciate your help . Thanks in advance.



 

 

2 ACCEPTED SOLUTIONS
InsHunter
Helper II
Helper II

Could simplify the DAX and achieve the objective and it can work for any number of levels.Sorry for over complicating the things initally.

Units_Expected =
VAR Node_ID=[Child Node ID]
RETURN
    sumx(
        FILTER(Units_Reconciliation_Table,        
                (Units_Reconciliation_Table[Immediate_Parent] =Node_ID)),  
         Units_Reconciliation_Table[Units_Actuals])

View solution in original post

InsHunter_0-1690911727952.png

Pl see the outcome of the calculated columns in the generated table

View solution in original post

2 REPLIES 2
InsHunter
Helper II
Helper II

Could simplify the DAX and achieve the objective and it can work for any number of levels.Sorry for over complicating the things initally.

Units_Expected =
VAR Node_ID=[Child Node ID]
RETURN
    sumx(
        FILTER(Units_Reconciliation_Table,        
                (Units_Reconciliation_Table[Immediate_Parent] =Node_ID)),  
         Units_Reconciliation_Table[Units_Actuals])

InsHunter_0-1690911727952.png

Pl see the outcome of the calculated columns in the generated table

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.