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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
russds
Frequent Visitor

Not summing parent aggregations

I would like produce a measure that does not aggregate the child values, but only the parent.  Like this example: 

 

russds_0-1638389079918.png

 

What I want is to get the value 68 (168-100) instead of 404 which is aggregating all the 168 values together. 

 

Note: Available Hours has summarization "Minimum" so that it doesn't sum the values, that's how I'm getting 168 for parent and child.  If there's a better way to achieve this, I'm happy to change it. 

 

Thanks in advance! 

 

1 ACCEPTED SOLUTION
v-kkf-msft
Community Support
Community Support

Hi @russds ,

 

Please try the following formula:

 

Measure = MIN('Sample'[Available Hours]) - SUM('Sample'[Allocated Hours])

vkkfmsft_0-1638846915523.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-kkf-msft
Community Support
Community Support

Hi @russds ,

 

Please try the following formula:

 

Measure = MIN('Sample'[Available Hours]) - SUM('Sample'[Allocated Hours])

vkkfmsft_0-1638846915523.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

bcdobbs
Super User
Super User

You'd need to count the number of projects in the filter context

and use it to determine what level you are at. Something like:

 

VAR ProjectCount = DISTINCTCOUNT(Table[ProjectId])


RETURN

IF (ProjectCount=1, [Availability], [Available]-[Allocated])

Having reread your orignal post I think you're using implicit measures based on columns so you'd need to explicitly write a simple measure for Availability, Available and Allocated. If you want to send a demo file over I'll have a look.

 



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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