web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Invalid Operation: Div...
Power Apps
Answered

Invalid Operation: Division by zero

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello everyone,

 

Seems Power Apps made an update recently, my apps pop up many runtime error "Invalid Operation: Division by zero"

Imaging I have a formula written as 

 

 

IfError(1/Cost, 0)

 

 

It should avoid this issue at all, but the error keeps pop up in the Apps Checker.

Is there a way we can disable this?

 
 
Categories:
I have the same question (1)
  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Please turn on this setting.

    v-xiaochen-msft_0-1616722398557.png

     

    Best Regards,
    Wearsky
    If my post helps, then please consider Accept it as the solution to help others. Thanks.

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you for reply however....
    Turned on - Saved - Published - Closed - Reopen
    The error message still there.

  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    If the problem persists, please try to change the version.

    v-xiaochen-msft_0-1616724127830.png

     

    Best Regards,
    Wearsky
    If my post helps, then please consider Accept it as the solution to help others. Thanks.

     

  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Does it work now?

    If the problem persists, I will suggest you to try another formula.

    If(Value(Cost)=0,0,1/Cost)

     

    Best Regards,
    Wearsky
    If my post helps, then please consider Accept it as the solution to help others. Thanks.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi, Wearsky

    1. There is only one version in the authoring version dropdown
    2. I tried to rewrote the formula as you suggested, but still no luck..

  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    So...Please try the formula . 

    If(IsBlank(Value(Cost)) ,0,1/Value(Cost))

     

    Best Regards,
    Wearsky
    If my post helps, then please consider Accept it as the solution to help others. Thanks.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Nah...
    Seems the formula error pops up that as long as there is dependent parameter in the denominator.
    Regardless of whether and how you conduct error catching.

  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Could you provide a specific formula?

     

    Best Regards,
    Wearsky

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at
    RoundUp(ThisItem.Quantity / Value(ct_lb_ps.Text),0)

    This formula is written in a Gallery Label.
    `ct_lb_ps` is also a Gallery Label.
    This Gallery is using a Collection as data source.
    This Collection is ClearCollected from a database with dynamical filter from previous page.

    ---

    So everytime if modified the formula, the error message will be gone until you Save and Reopen.

  • Verified answer
    v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Please try this formula.

    If(IsBlank(Value(ct_lb_ps.Text)),0,RoundUp(ThisItem.Quantity / Value(ct_lb_ps.Text),0))

     

    The formula works fine in my environment.

     

    Best Regards,
    Wearsky

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 366 Most Valuable Professional

#2
11manish Profile Picture

11manish 184

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 99 Super User 2026 Season 1

Last 30 days Overall leaderboard