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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
k_rahul_g
Frequent Visitor

Parent Child relation ship for dashboarding

Hi, 

I have a 3 level parent child relation ship.  and I need to summarize report at the top most hierarchy. 

 

here is the scenario. 

Effort estimation and actuals are being done on the lowest level of task i.e. WORK CR. and it has parent relationship to a mid level CR which might be an Integration CR. Finally this Integration CR may be called upon by Parent CR which could be a new requirement of a bug fix (ICR or Anomaly). 

 

Now same Integration CR may be linked to more than one ICR or anomaly.  So finally I need to divide the effort from WORK CR equally in to the ICR or Anomaly.  

How could I do this calculation in Power BI DAX. 

 

Sample data is atttached. Any help ?

eg: Look at Work CR "EA3#15808" - it has multiple entry as it is linked to 2 Parent CRs  EA3#14970 , EA3#14982. 

Now if I dont solve this, i am getting double booking of this task once in each parent CR. 

 

k_rahul_g_0-1636408473104.png

 

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @k_rahul_g ,

 

I think I understand your requirements and I'm assuming that the only field that will cause duplicates as described is [CR].

Based on this assumption, the following new measures for [effort budgeted] and [effort actual] should work:

 

_effortBudgetSplit =
VAR __crCount =
CALCULATE(
  DISTINCTCOUNT(yourTable[CR]),
  ALLEXCEPT(yourTable, yourTable[Work CR])
)
RETURN
SUM(yourTable[effort budgeted]) / __crCount
_effortActualSplit =
VAR __crCount =
CALCULATE(
  DISTINCTCOUNT(yourTable[CR]),
  ALLEXCEPT(yourTable, yourTable[Work CR])
)
RETURN
SUM(yourTable[effort actual]) / __crCount

 

Obviously, I don't know if your screenshot shows columns or measures, or what your model/table structure is, but hopefully the above measures give you an idea of how to handle your scenario.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

1 REPLY 1
BA_Pete
Super User
Super User

Hi @k_rahul_g ,

 

I think I understand your requirements and I'm assuming that the only field that will cause duplicates as described is [CR].

Based on this assumption, the following new measures for [effort budgeted] and [effort actual] should work:

 

_effortBudgetSplit =
VAR __crCount =
CALCULATE(
  DISTINCTCOUNT(yourTable[CR]),
  ALLEXCEPT(yourTable, yourTable[Work CR])
)
RETURN
SUM(yourTable[effort budgeted]) / __crCount
_effortActualSplit =
VAR __crCount =
CALCULATE(
  DISTINCTCOUNT(yourTable[CR]),
  ALLEXCEPT(yourTable, yourTable[Work CR])
)
RETURN
SUM(yourTable[effort actual]) / __crCount

 

Obviously, I don't know if your screenshot shows columns or measures, or what your model/table structure is, but hopefully the above measures give you an idea of how to handle your scenario.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors