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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.