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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
NadeemAhamed
Helper V
Helper V

Avoiding #DIV/0! (inf) for calculated values

Dear All, 

Greetings!

 

I have calculated measures which is perform division for two physical column from excel sheet. 

We have some formula=IFERROR(A1/B1,0) in excel to avoid this #DIV/0! or inf error accured to replace by 0.

 

can we have any formula or any option in Power BI to replace this error to 0. 

 

 

7 REPLIES 7
tharunkumarRTK
Super User
Super User

@NadeemAhamed 
why can't you use divide function? https://dax.guide/divide/
which accepts an optional third argument as an alternative result to avoid divide by zero errors?


If the post helps please give a thumbs up


If it solves your issue, please accept it as the solution to help the other members find it more quickly.


Tharun



Bcz i that column was have some formate and calculation so we have created measures for that, 

In that measures we have to avoid this error.

I went through your pbix file and I definetly think you can use divide function. Have you tried using it and if yes what is the error?

Ahmedx
Super User
Super User

pls use

IFERROR()
or
DIVIDE([measure1],[measure2],0)

iam not using division directly. 

here is my pbix file.

https://toyotsu.box.com/s/5ohfmo6nu51lj4rtp4oxq1csms4vndfc

 

here i want to apply formula to varianance and achievement measures. 

I don’t understand what you are dividing by what, where is the #DIV/0!,

In my actual data we have this error. 

what i have shared that is sample data. 

i want to apply formula for this variance and achievement measures

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.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors