Forum Discussion
Poisedon
7 years agoFrequent Visitor
Sum by category
Hi all, In the Query I need to sum values by "Client" but I can't use "Group by..." because it deletes other columns. I also want to put 0 for other rows with same Client (can't delete because in ot...
- 7 years ago
Try a new calculated column like
Column = IF ( [Value] = CALCULATE ( MAX ( Table1[Value] ), ALLEXCEPT ( Table1, Table1[Client] ) ), CALCULATE ( SUM ( Table1[Value] ), ALLEXCEPT ( Table1, Table1[Client] ) ), 0 )
Zubair_Muhammad
Community Champion
7 years ago
Try a new calculated column like
Column =
IF (
[Value]
= CALCULATE ( MAX ( Table1[Value] ), ALLEXCEPT ( Table1, Table1[Client] ) ),
CALCULATE ( SUM ( Table1[Value] ), ALLEXCEPT ( Table1, Table1[Client] ) ),
0
)
Poisedon
7 years agoFrequent Visitor
It works if i take the column with no aggregation, but in my table I've sum of values, so values are wrong in this case :/