Skip to main content
Known Participant
June 24, 2021
Question

Required script for decimal calculation

  • June 24, 2021
  • 2 replies
  • 783 views

Hi, 

Hope you all are safe

 

This is my issue regarding decimal calculation.
I can achieve one from Mathround and another by without mathround. I want to get answer like excel with one script which will give answer in all condition.

 

A1B1C1D1E1F1G1ResultAverage
0.810662.78=C2/B2=D2/1000=A2*E2*I2100=(F2*G2)*5230
0.7510900=C3/B3=D3/1000=A3*E3*I3100=(F3*G3)*5254
0.610900=C4/B4=D4/1000=A4*E4*I4100=(F4*G4)*5254

 

I will be glad if you can help me with this. 

 

I have attached google drive link below and upload file here as well. 

Download excel file . 
Please check excel and pdf from google drive.  



Regards,

Bhuwesh Singh

This topic has been closed for replies.

2 replies

try67
Community Expert
Community Expert
June 24, 2021

This is a common problem. It's important to understand that the Format setting only affects how the value of the field is displayed, not the actual value. So if you want to round the values to two decimal points, setting the Format to Number with 2 decimals will NOT do that. It will just display it as-if it was truncated, but if you use it in a calculation, the underlying value will be used. You have to use a calculation script to perform the actual rounding.

rakeshk21205956
Inspiring
June 24, 2021

What is your exact requirement. Plz explain   

If you want to Round to any specific number of decimal points  then you already have the script  in Field D17 ,   use the function Round whereever you want.  just put the function at Document Level .