Forum Discussion
Grouping data & sum negatives
Anonymous
Try this measure
Measure =
CALCULATE (
SUM ( Table1[Value] ),
FILTER ( VALUES ( Table1[Category] ), CALCULATE ( SUM ( Table1[Value] ) ) < 0 )
)
- Anonymous7 years agoNot applicable
Zubair_Muhammad Thanks for the reply, however this only gives me the net figure at item level, ignoring the roll up to Category - unless I filter on a specific category.
I'm not sure if it makes a difference, but the Category is actually a column found in another table based on a match on Item. The actual table layout is:
Table 1 - Category, Item
Table 2 - Item, Week, Site, Value
As a default view (using the larger table in the original post), I would expect to see -17 (Sum(C2)=-17, Sum(C1)=11 so ignored) however I am actually seeing either -6 (Total NET using reply #1) or -90 (Sum of all negatives using reply #2)
- Zubair_Muhammad7 years ago
Community Champion
Anonymous
Could you share your file? Will try to help
- Anonymous7 years agoNot applicable
Sorry for the late reply. Here is the sort of data I am using and a mocked up dashboard
Once the file is opened, the label should be displaying the sum of the boxes above. The one on the left is correct (sum of all the column), but the one on the right should sum all negative categories (-34061.3)
Thanks