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

Notifications

Announcements

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

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 (0)
  • v-xiaochen-msft Profile Picture
    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
    on at

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

  • v-xiaochen-msft Profile Picture
    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
    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
    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
    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
    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
    on at

    Hi @Anonymous ,

     

    Could you provide a specific formula?

     

    Best Regards,
    Wearsky

  • Community Power Platform Member Profile Picture
    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
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard