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.
Hello community,
I am doing my first steps with Power BI and now I've gotten to a point where I require some help.
In below example I have row values that need to be aggregated based on the ParentID
If the sum of Current for all rows of that ParentID is greater than ZERO, then put this value in another measure/column which can be used in other calcuations.
At the moment I use a "Combined" column which gives wrong sums because I can only check each row if a Current value exists.
The correct sum for those two examples is 3350 and 10.
Let me know if you need more details.
Hope you can help me.
Best regards,
Thorsten
Solved! Go to Solution.
Hi @tonyclifton
measure below
Combined = IF(SUM(Sheet5[Current])>0,SUM([Current]),0)
Best Regards
Maggie
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)
Proud to be a Super User!
@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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
81 | |
66 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |