cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tuan
Helper III
Helper 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.

1 ACCEPTED SOLUTION
Wimverh
Resolver IV
Resolver 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 ) )

View solution in original post

2 REPLIES 2
Wimverh
Resolver IV
Resolver 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 ) )

View solution in original post

parry2k
Super User
Super User

@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!






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors