Calculating tax rates based off of city, but the tax is rounding up

Answered

Comments

1 comment

  • Official comment
    Avatar
    Joseph

    HI Sara,

     

    Great question! All number, calculation, and summary fields have the ability to set the number of decimal places that a value will be rounded to. Therefore, if, like in this situation, you have your tax field configured to be "currency" style, it will round to 2 decimal places automatically. The problem here, is that your tax rates have values that go past two decimal places. For example, if your tax rate is 0.086, then when you do your calculation later in the app, because your tax rate field removed the values after the second decimal place 0.08, the value will not come out right on your output. 

     

    Instead, set the style of your number field to "number".

     

    Then, go to "more" settings, and set the "decimal places" setting to the correct number of decimal places required.

     

    Once you have done this, your calculations will no longer round the cost up or down.

    For more information on the subject, check out our help topic on how to use calculation fields here: https://help.gocanvas.com/hc/en-us/articles/231963027-How-to-use-calculation-and-summary-fields-in-the-App-Builder

     

    Comment actions Permalink

Please sign in to leave a comment.