Infopath: Limit decimal places to display for a calculation

We were adding up monetary fields and found that the calculation was giving us to many decimal places. Below you will find the solution to get them back to 2:


Round to 2 decimal places:  
round((calculation) * 100) / 100


Round to 3 decimal places: 
round((calculation) * 1000) / 1000


Example:

Formula: round((1.5555*42)*100) / 100

result: 65.33

This entry was posted in InfoPath, SharePoint and tagged , , . Bookmark the permalink. Follow any comments here with the RSS feed for this post. Post a comment or leave a trackback: Trackback URL.

4 Comments

  1. Posted January 8, 2015 at 12:21 am | Permalink

    what type of InfoPath field did you use and what format did you specify

    • Posted January 8, 2015 at 1:22 pm | Permalink

      It was a number field created in InfoPath and as such it did not have a format to choose from. Hope that helps!

  2. Posted March 29, 2016 at 2:41 pm | Permalink

    This is exactly what I needed. Thanks, JP!

  3. Posted April 7, 2016 at 12:38 pm | Permalink

    I used this formula in InfoPath, this is in SharePoint. Now using excel to pivot my data. I have exported to excel, the amount appears rounded but the value is still the original 6 place decimal, so my total is off by pennies. Is there a way to change the value and not just the display?

Leave a Reply

Your email address will not be published. Required fields are marked *