Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
natabird3
Skilled Sharer
Skilled Sharer

Divide or iferror doesnt produce correct result when value has 0

Dear all,

 

I have a simple divide measure that should divide one data with another. Both values are derived as measures, which filters two values and then i simply tried using the iferror(actual/budget, blank()). Then I tried with divide instead of /, however in both results i am still getting some strange results:

Capture.JPG

Any idea why i still get value for when dividing by 0? Should remain blank but it isnt. I also tried if(budget=0, Blank(), IFERROR(actual/budget, blank())) but again was getting those in there. Any ideas would be appreciated, using direct query for this. 

1 ACCEPTED SOLUTION

@natabird3 It's almost certain because it has budget values that are very close to zero, but not really zero, like .0000001 or something. You probably need ROUND.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@natabird3 , You can use

divide

Divide([actual],[budget])

or

Divide([actual],[budget],0)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Greg_Deckler
Community Champion
Community Champion

@natabird3 You should use DIVIDE(actual,budget, blank()) Don't use IFERROR, it is slow.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Unfortunately, with divide like this i am still getting the large % values which i cannot explain why is happening, instead of those being replaced by blanks. Any ideas?

@natabird3 It's almost certain because it has budget values that are very close to zero, but not really zero, like .0000001 or something. You probably need ROUND.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

indeed using Round helped to solve the issue.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors