Skip to main content

Is there a way to truncate/round an average field in an Aggregate Model?

I want to show two decimal places via merge syntax in a rich text area.


I tried to use a formula field, but I had two problems:


  1. The ROUND function rounds to the nearest integer (no decimals).

  2. The formula fields don’t seem to respect the metadata settings for decimals (see below)

    Here are my formula field settings:


    (field should only display two decimal places)



(just a copy of the AVG() function from the aggregate model.


And here’s what I get in runtime:

Well, here’s a really stupid way. With the forumal set to return TEXT instead of a number, make this the formula:

FLOOR({{{avgGestation}}}) + ‘.’ + ROUND( ( {{{avgGestation}}} - FLOOR({{{avgGestation}}}) ) * 100 )


Reply