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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
mg
New Member

Parent / Child Relation + Multiply

Hi !

 

Ive the following table. 

Ive succeeded with Power BI to sum for A (=B+F) and B(=C+D+E) through a parent / child relationship. 

Nevertheless, i wd like to add a mark-up on A and B meaning B = (C+D+E)*1,07 and A =(B+F)*1,07. 

Any suggestion would be highly appreciated 🙂

Many thanks 

 

ITEMPathIDLevel of Current ElementTypeCurrent ElementCurrent Element Issue IndexParent ElementParent TypeParent Issue IndexQuantity (link only)DesignationUnit Price 
AD572480000040DASSYD57248000004ASNULLDASSYNULLNULLWING BOX STRUCTURE GA
BD57248000004 / D572480060101DASSYD57248006010MD57248000004DASSYAS1.0000000BOLTING PNL 1 FS BTM
CD57248000004 / D57248006010 / ABS0548VHK4-062STDPTABS0548VHK4-06NULLD57248006010DASSYM25.0000000PIN,SWAGELOCKINGCSK50
DD57248000004 / D57248006010 / ASNA2025-42STDPTASNA2025-4NULLD57248006010DASSYM220.0000000COLLAR,SWAGELOCKING100
ED57248000004 / D57248006010 / D572502082162DDPTD57250208216L03D57248006010DASSYM2.0000000PLUG SEALING1000
FD57248000004 / ABS0548VHK6-121STDPTABS0548VHK6-12NULLD57248000004DASSYM7.0000000PIN,SWAGELOCKINGCSK3000
1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @mg,

 

I'd like to suggest you take a look at below link which mentioned about how to use path function to create custom hierarchy for analysis.

Parent-Child Hierarchies

 

Sample:

Level 1 =
VAR replaced =
    SUBSTITUTE ( [PathID], " ", "" )
RETURN
    PATHITEM ( SUBSTITUTE ( replaced, "/", "|" ), 1 )
	
Level 2 =
VAR replaced =
    SUBSTITUTE ( [PathID], " ", "" )
RETURN
    PATHITEM ( SUBSTITUTE ( replaced, "/", "|" ), 2 )
	
Level 3 =
VAR replaced =
    SUBSTITUTE ( [PathID], " ", "" )
RETURN
    PATHITEM ( SUBSTITUTE ( replaced, "/", "|" ), 3 )

Add hierarchy columnAdd hierarchy columnCreate custom hierarchyCreate custom hierarchyCreate matrix visualCreate matrix visual

 

Notice: I add visual level filter to remove blank value.

 

Regards,

Xiaoxin Sheng

View solution in original post

1 REPLY 1
Anonymous
Not applicable

HI @mg,

 

I'd like to suggest you take a look at below link which mentioned about how to use path function to create custom hierarchy for analysis.

Parent-Child Hierarchies

 

Sample:

Level 1 =
VAR replaced =
    SUBSTITUTE ( [PathID], " ", "" )
RETURN
    PATHITEM ( SUBSTITUTE ( replaced, "/", "|" ), 1 )
	
Level 2 =
VAR replaced =
    SUBSTITUTE ( [PathID], " ", "" )
RETURN
    PATHITEM ( SUBSTITUTE ( replaced, "/", "|" ), 2 )
	
Level 3 =
VAR replaced =
    SUBSTITUTE ( [PathID], " ", "" )
RETURN
    PATHITEM ( SUBSTITUTE ( replaced, "/", "|" ), 3 )

Add hierarchy columnAdd hierarchy columnCreate custom hierarchyCreate custom hierarchyCreate matrix visualCreate matrix visual

 

Notice: I add visual level filter to remove blank value.

 

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors