Forum Discussion

Sasha's avatar
Sasha
Icon for Helper III rankHelper III
8 years ago
Solved

SUMX 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
  • Zubair_Muhammad's avatar
    8 years ago

    Sasha

     

    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