Forum Discussion

NadeemAhamed's avatar
NadeemAhamed
Helper V
2 years ago

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

  • pls use

    IFERROR()
    or
    DIVIDE([measure1],[measure2],0)
  • 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



    • NadeemAhamed's avatar
      NadeemAhamed
      Helper V

      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.

      • tharunkumarRTK's avatar
        tharunkumarRTK
        Super User

        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?