DAX divide issue

Cime14

New Member
Joined
Dec 19, 2017
Messages
30
Hi all,

how could I correct the formula in power pivot measures to get value 0% where numerator and denominator are both 0?
I was able to resolve this issue where only denominator is 0 but I am lost when both are.

My current formula:
=DIVIDE(CALCULATE(SUM(SAP_Final[MTD]));CALCULATE(SUM(FCRS_PM[MTD]));1)-1

Would appreciate your help!

1633686200012.png


Have a nice day!
 
@pjmorris Thanks a lot!! You solved it!!
I used =IF(AND(SUM(SAP_Final[MTD])=0, SUM(FCRS_PM[MTD])=0), 0, DIVIDE(SUM(SAP_Final[MTD]), SUM(FCRS_PM[MTD]), 1)-1) and got what I wanted!

Many thanks to both!
 
Upvote 0

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

Forum statistics

Threads
1,225,531
Messages
6,185,485
Members
453,297
Latest member
alvintranvcu123

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top