Forum Discussion
Aggregate Sum based on Column
- 8 years ago
Hi tonyclifton
measure below
Combined = IF(SUM(Sheet5[Current])>0,SUM([Current]),0)
Best Regards
Maggie
might be an easier way but what i would first do is summarize the table
ie. summary = SUMMARIZE(Table2, Table2[ParentID], "TotalCurrent", sum(Table2[Current]))
then i would create a relationship between the 2 tables on parentid
then i would create a measure in the first table
test = if(sum(summary[TotalCurrent]) > 0, sum(summary[TotalCurrent]), 0)
vanessafvgthank you. This seems to do the trick to get the correct sums. However I missed to add one important column to the example which is needed to present the values by a status.
Each ChildID can have a different Status
If the sum of Current for a ParentID is greater than zero, set the value of the "Combined" column to zero where a Budget value exists in order to also get the correct values for each row.
Example:
Is that possible?
Thanks.