Forum Discussion
Sasha
Helper III
8 years agoSUMX on one column
Hi,
I was wondering if there might be a case when we'll prefare using SUMX over SUM even if it involves just one column?
Thanks
Alex
Interesting!!
May be when you need to do some calculation on individual values of the Column before summing them up
For example
Measure = SUMX ( ALLSELECTED ( Table1[Column] ), IF ( [Column] < 3, [Column] * 10, [Column] * -10 ) )Also SUMX is the only option when you have to sum the columns of a temporary table created using a VARIABLE
2 Replies
- AnonymousNot applicable
- Zubair_Muhammad
Community Champion
Interesting!!
May be when you need to do some calculation on individual values of the Column before summing them up
For example
Measure = SUMX ( ALLSELECTED ( Table1[Column] ), IF ( [Column] < 3, [Column] * 10, [Column] * -10 ) )Also SUMX is the only option when you have to sum the columns of a temporary table created using a VARIABLE