cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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,
 

qw.png

Can you guide me, please?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User VI
Super User VI

Re: Total Measure Wrong

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





Did I answer your question? Please mark my post as a solution! Kudos are also appreciated!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
Highlighted
Super User VI
Super User VI

Re: Total Measure Wrong

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





Did I answer your question? Please mark my post as a solution! Kudos are also appreciated!

Proud to be a Super User!




View solution in original post

Highlighted
Community Support
Community Support

Re: Total Measure Wrong

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.

Highlighted
Frequent Visitor

Re: Total Measure Wrong

Mahoneypat, thank you, this help me with the issue!

Helpful resources

Announcements

August Community Highlights

Check out a full recap of the month!

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors