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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
MZw
New Member

Parent-Child Hierarchy calculation with weights

Hello,

 

i'm new to PowerBI and have a question: 

I'm working with a 6 level deep parent-child hierarchy and depending on the level, the entries must be multiplied with a specific weight. The weights of a Level should not be summed up with the weights of the respective upper Level, because the upper one has its own specific weight. 

You can see the desired outcome in the last column of the example table on the right. 

In the "Weight" Column is the data, as it gets displayed (summed) without any further measures. I already tried to use "Dont summarize" but this isnt working.

In the "Weight Level 1" Column the summing for Level 1 is supressed with a specific measure:

Gewicht Level 1 =
IF(HASONEVALUE(mobilityindices[Level 2]),
   CALCULATE(SUM(mobilityindices[weight]), FILTER(VALUES(mobilityindices[Level 2]),mobilityindices[Level 2] <> "")),
   CALCULATE(SUM(mobilityindices[weight]),mobilityindices[Level 2] =""))
In the "Weight Level 2" Column happens the same:
Gewicht Level 2 =
IF( HASONEVALUE(mobilityindices[Level 3])
   ,CALCULATE(SUM(mobilityindices[weight]), FILTER(VALUES(mobilityindices[Level 3]),mobilityindices[Level 3] <> ""))
   ,CALCULATE(SUM(mobilityindices[weight]),mobilityindices[Level 3] ="" )
)
My thought was to combine the two shown (but in the end 5 similar) Measures so that the output would be my desired output.
My two questions are:
  • Is this possible?
  • Is this the right way to do it, or would another solution be better?

MZw_0-1665062858207.png

 

Thanks in advance for helping me!

MZW

 

1 REPLY 1
v-chenwuz-msft
Community Support
Community Support

Hi @MZw ,

 

I think this is feasible. Or use switch to write this function. Write the 5 formulas together. Essentially there is no difference.

 

Best Regards

Community Support Team _ chenwu zhu

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.