Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Morning,
I'm a new user to Power BI and have spent the morning trying to figure out how to calculate the total hours for the "parent" based on the hours of the "children". I know the hours for each child, but need to sum them together to get the hours for the parent. I could use some help.
Any thoughts, suggestions, links, or examples are truly appreciated.
Here is a highlight of the data provided.
Thanks, Alex
Solved! Go to Solution.
Hi @AlexBA ,
Please try this code:
Column =
CALCULATE (
SUM ( 'Table'[Child Estimated Hours] ),
FILTER (
'Table',
[Parent Work Item Id] = EARLIER ( 'Table'[Parent Work Item Id] )
)
)
Result:
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @AlexBA ,
In the table visual, power bi will calculate the hours automatically when you drag it to the values of its Values. O you can use the following measure to sum them.
Measure = SUM('Table'[Child Estimated Hours])
Result:
Pbix in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Morning and Thank you.
I'm looking to do the breakdown within a table, not a visual, unfortunately. On the breakdown, I need to be able to filter/sum the hours by the parent. I'll need to create a column that's the total of each Parent ID hours.
For example, Parent ID 25240 should have a total of 190 hours since its children are 25241 (38 Hours) and 25245 (152 Hours).
Maybe that question now is how to add a parent filter to your measure?
Thanks,
Alex
Hi @AlexBA ,
Please try this code:
Column =
CALCULATE (
SUM ( 'Table'[Child Estimated Hours] ),
FILTER (
'Table',
[Parent Work Item Id] = EARLIER ( 'Table'[Parent Work Item Id] )
)
)
Result:
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
75 | |
63 | |
52 | |
47 |
User | Count |
---|---|
218 | |
86 | |
64 | |
63 | |
60 |