Print this page

Opportunity amount field printed on quote is rounded off. How to ensure that it is not rounded but rather truncated

Knowledge Article Number 000212189
Description Users usually send quotes to customer however on the screen it is rounded off but when quote is generated and sent it has the true value Ex: 7.31111111111111

This makes the opportunity and the quote different from one another, User needs to have the decimal cut off on the second place with no rounding off.
Resolution We can suggest this formula:

FLOOR( UnitPrice ) + VALUE(MID(text( UnitPrice) , LEN(  TEXT(FLOOR( UnitPrice ))  ) +1 , 3))

Understanding the formula

FLOOR( UnitPrice )  
  • This displays the integer with no decimals. In this example this function would return 7
LEN(  TEXT(FLOOR( UnitPrice ))  ) +1  
  • This is to start at the decimal point right after the number. In this case this value would be 2
MID(text( UnitPrice) , LEN(  TEXT(FLOOR( UnitPrice ))  ) +1 , 3)
  • This will make use of MID that would start showing characters exactly starting from the decimal and 2 more numbers after decimal. In this example the returned value will be .31
Putting the formula together

FLOOR( UnitPrice ) + VALUE(MID(text( UnitPrice) , LEN(  TEXT(FLOOR( UnitPrice ))  ) +1 , 3))
  • we are just concatenating the integer and the decimal. 7 and .31 which will give the result as 7.31

promote demote