Forum Discussion

paolomint's avatar
paolomint
Helper III
3 years ago
Solved

No SUM for IF function

Dear all,

please have a look below.

I'm using a IF function and I don not understand why it works correctly but the total ammount of the row is zero and not the sum of all the values.

How can I fix this?

Thanks in advance.

Paolo

 

  • Thank for your reply,

    I need an if function because I need sum on different column.

    Anyhow I solved in SQL. 

    Bye

    Paolo

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi,
    1- Show you complete dax function, also the refrenced measure.
    2- Use Calculate function intead of if, to get the sum for filtered conditions, like this
    calculate(sum('tablename'[columnname]),Condition 1 && Condition 2 ---------etc)

    • paolomint's avatar
      paolomint
      Helper III

      Thank for your reply,

      I need an if function because I need sum on different column.

      Anyhow I solved in SQL. 

      Bye

      Paolo