Forum Discussion
Anonymous
7 years agoNot applicable
Divide by Zero error
Hi All, I have this measure that's causing error due to divide by zero error. How can I get pass this? % Change = SUMX(Summary, Summary[CQ] - Summary[PYQ]/(Summary[PYQ])) Thanks Ejyks
- Anonymous7 years ago
Think this should work:
% Change = SUMX ( Summary, DIVIDE( (Summary[CQ] - Summary[PYQ] ), //Numerator Summary[PYQ] , //Denominator "If Error, put something here!" //Alternate Result ) )
Anonymous
7 years agoNot applicable
Could you help me apply the divide function into the formular above as I'm getting error applying it.
Thanks.
Anonymous
7 years agoNot applicable
Think this should work:
% Change =
SUMX (
Summary,
DIVIDE(
(Summary[CQ] - Summary[PYQ] ), //Numerator
Summary[PYQ] , //Denominator
"If Error, put something here!" //Alternate Result
)
)- Anonymous7 years agoNot applicable
This worked but I'm having -100% where 0 is dividing a number . How can I make thi sto be 0% instead of -100%
This is what I used.
% Change PYQ = SUMX(Summary,DIVIDE (Summary[CQ] - Summary[PYQ], //NumeratorSummary[PYQ] //Denominator))- Anonymous7 years agoNot applicable
Without seeing exactly what you are talking about, what if you tried this:
% Change = SUMX ( Summary, DIVIDE( (Summary[CQ] - Summary[PYQ] ), //Numerator Summary[PYQ] , //Denominator 0 //Alternate Result ) )- Anonymous7 years agoNot applicable
I couldnt screen shot my table here but it shows like this
% Change
-4%
-3%
-100%
-100% being the one I want to show 0% and there's no change after I applied the latest formula.