Forum Discussion

Tuan's avatar
Tuan
Helper III
6 years ago
Solved

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.
  • Wimverh's avatar
    6 years ago

    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 ) )