Forum Discussion

marcomartinez's avatar
marcomartinez
Frequent Visitor
6 years ago
Solved

Total Measure Wrong

Hello, I'm stuck with the following problem,  when I try to get the substraction of two columns in a new meassure the total of this one is wrong,

 

My formula is next:

 

subtraction = IF( SUM('Discovery'[FARDOSINVOL 2020]) = 0, 0, SUMX('Discovery','Discovery'[FARDOSINVOL 2020]-'Discovery'[FARDOSINVOL 2019]))
 
And the result is incorrect,
I'm looking for the substraction of 2020 and 2019 only when 2020 be greater than 0,
 

Can you guide me, please?

  • Pleast try this expression.  It should give you the correct results both on the rows and in the total, replacing with your table[column for your month values.

     

    New Measure = SUMX(VALUES(Table[Month]), [subtraction])

     

    If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

    Regards,

    Pat

3 Replies

  • mahoneypat's avatar
    mahoneypat
    Microsoft Employee

    Pleast try this expression.  It should give you the correct results both on the rows and in the total, replacing with your table[column for your month values.

     

    New Measure = SUMX(VALUES(Table[Month]), [subtraction])

     

    If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

    Regards,

    Pat

  • dax's avatar
    dax
    Community Support

    Hi marcomartinez , 

    You could refer to mahoneypat ' s suggestions, if this doesn't work, please inform me more detailed information(such as your expected output and your sample data )? Then I will help you more correctly.

    Please do mask sensitive data before uploading.

    Thanks for your understanding and support.
    Best Regards,
    Zoe Zhi

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.