Forum Discussion
Tuan
6 years agoHelper III
Divide function Remove 0 results
Been trying to figure this out for a while. I'm trying to remove the results that show 0 when using the divide function.
I tried using Numerator/Denominator but that gives me Infinity.
The divide function has an option to fix the result of dividing by zero, and specifying an alternative value.
MyMeasure= DIVIDE(100,0,"Division by zero")However if your Numerator is 0, then the default result will be zero. To fix this, wrap an IF statement around your measure
MyMeasure = IF ( DIVIDE ( 0, 100 ) = 0, BLANK (), DIVIDE ( 100, 0 ) )
2 Replies
- WimverhResolver IV
The divide function has an option to fix the result of dividing by zero, and specifying an alternative value.
MyMeasure= DIVIDE(100,0,"Division by zero")However if your Numerator is 0, then the default result will be zero. To fix this, wrap an IF statement around your measure
MyMeasure = IF ( DIVIDE ( 0, 100 ) = 0, BLANK (), DIVIDE ( 100, 0 ) )