Skip to main content

Notifications

Community site session details

Community site session details

Session Id : EMUc3sMDgC8xyihDcot3hd
Power Apps - Building Power Apps
Answered

Invalid Operation: Division by zero

Like (0) ShareShare
ReportReport
Posted on 25 Mar 2021 20:25:56 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:
  • tinbantan Profile Picture
    8 on 23 Aug 2023 at 06:19:58
    Re: Invalid Operation: Division by zero

    Thank you. Your solution help me 😊

  • james_hathaway Profile Picture
    427 on 20 Jan 2022 at 09:42:26
    Re: Invalid Operation: Division by zero

    @v-xiaochen-msft
    Please report to Microsoft and let us know what is being done about the bug.

    Thanks.

  • james_hathaway Profile Picture
    427 on 20 Jan 2022 at 08:41:24
    Re: Invalid Operation: Division by zero

    It would appear that this error has resurfaced in Authoring Versions:

    3.21123 & 3.21124

    There are a number of bugs that were previously fixed, but have reappeared in these versions - so there's been some really shoddy Integration Testing by the product Team, and they've merged in a load of features that undoes the previous bug fixes.

     

    As is also noted on this forum, Microsoft have also disabled the ability to use a previous Authoring version (the drop-down lost only ever gives you the option for the current version), so we're all kind of screwed until Microsoft (re)fix the engine - we simply can't edit any of our Apps at all, as doing so automatically upgrades them to the newest Authoring version, with no option to roll back.

     

    We cannot continue using a product that just changes under our feet, without any warning, choice, or even the ability to feedback - As we all know, Microsoft support is WORSE THAN USELESS if you happen to know even a tiny bit about programming or development - so very difficult to actually talk to somebody that knows more than you do).

     

    Microsoft NEED to manage their Authoring Release process a LOT better. we need:

    • Warning of when a new Authoring Version is going to be available
    • Clear Advertised Release Notes for the changes in the new version
    • the OPTION to upgrade your app to the new version, or continue using the version you are on.
      • To give us the ability to run proper Testing on a separate App instance before upgrading the App in production
    • the Ability to ROLL BACK to the previous authoring version
    • the Ability to give FEEDBACK about the issues that an new version has created
    • "Developer" Support that allows us to bypass the USELESS Microsoft Help-desk staff and actually talk to a member of the PowerApps Development Team that are actually involved in the new release (you know... like everyone else in the industry does on GitHub, which Microsoft OWN for Pete's sake!)

    In the mean time - PLEASE ALLOW US TO ROLL BACK TO AUTHORING VERSION 3.21115, which is the last version we used that didn't randomly throw "divide by zero" errors.

  • v-xiaochen-msft Profile Picture
    on 07 Apr 2021 at 00:52:05
    Re: Invalid Operation: Division by zero

    Hi @Anonymous ,

     

    The issue has been reported to the Microsoft team.

     

    Best Regards,
    Wearsky

  • Community Power Platform Member Profile Picture
    on 05 Apr 2021 at 23:15:19
    Re: Invalid Operation: Division by zero

    @v-xiaochen-msft 

  • Community Power Platform Member Profile Picture
    on 28 Mar 2021 at 23:43:20
    Re: Invalid Operation: Division by zero

    Yes, it produces error even in a new environment.

    Capture.PNG

  • v-xiaochen-msft Profile Picture
    on 26 Mar 2021 at 03:37:17
    Re: Invalid Operation: Division by zero

    Hi @Anonymous ,

     

    Please do a simple test to verify if your environment has problems using IfError() function.

     

    1\ Open this setting

    v-xiaochen-msft_0-1616729670933.png

     

    2\ Add a textinput control 'TextInput1' and set its Default property to:

    ""

     

    3\ Add a lable and set its Text property to:

    IfError(1/Value(TextInput1.Text),0,1/Value(TextInput1.Text))

     

    Please check if it reports an error or works normally.

     

    Best Regards,

    Wearsky

     

  • Community Power Platform Member Profile Picture
    on 26 Mar 2021 at 03:26:48
    Re: Invalid Operation: Division by zero

    Thanks you, thats great. it also works fine for me this time as well.

    However can you report/forward this issue to developers?

    Cause I have many formulas like this, some are very calculation intense, add extra layer of verification in a clunky app is like grinding it to halt. eg.,

    Text(
     (Sum(
     Cart_Gallery_Cart.AllItems,
     Cart_TextInput_Price * Cart_TextInput_Quantity
     ) - Sum(
     Cart_Gallery_Cart.AllItems,
     Cart_Label_TotalPrice
     )) / Sum(
     Cart_Gallery_Cart.AllItems,
     Cart_TextInput_Price * Cart_TextInput_Quantity
     ) * 100,
     "[$-en-US] #0.00%"
    )

     

  • Verified answer
    v-xiaochen-msft Profile Picture
    on 26 Mar 2021 at 03:17:03
    Re: Invalid Operation: Division by zero

    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

  • Community Power Platform Member Profile Picture
    on 26 Mar 2021 at 03:05:55
    Re: Invalid Operation: Division by zero
    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.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 89 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 58

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 42 Super User 2025 Season 1

Overall leaderboard