Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
marcomartinez
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
mahoneypat
Employee
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





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

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

3 REPLIES 3
dax
Community Support
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.

mahoneypat
Employee
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





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

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


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

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.