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.

  • 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

  • Tuan your 3rd parameter should be zero, DIVIDE ( Value1, Value2, 0 )

     

    I would 💖 Kudos 🙂 if my solution helped. If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

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