Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Subtracting Two Values

Hello all,

 

I am new to Power BI so I apoligize if this is an easy answer.

 

I need to subtract the values in one column from the values in another. I have written it as 

 
(SUM(HR[Annual Rate]-SUM('BY VP'[Annual Rate - Duplications])))
 
but I get the error: "The SUM function only accepts a column reference as an argument."
 
Not sure exactly what this means, any help is appreciated
 
 
 
 
Thanks in advance
 
  • Anonymous try this

     

    SUM(HR[Annual Rate])-SUM('BY VP'[Annual Rate - Duplications])

    Would appreciate Kudos 🙂 if my solution helped. 

4 Replies

  • Anonymous try this

     

    SUM(HR[Annual Rate])-SUM('BY VP'[Annual Rate - Duplications])

    Would appreciate Kudos 🙂 if my solution helped. 

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you!

  • v-lili6-msft's avatar
    v-lili6-msft
    Community Support

    hi  Anonymous 

    From the scrennshot, there is a small mistake that a syntax error in the formula, just add ")" after HR[Annual Rate]

     

    Please try this as parry2k provided:

     

    Measure = SUM(HR[Annual Rate])-SUM('BY VP'[Annual Rate - Duplications])

     

     

    Regards,

    Lin