Help

Problem with SUM and precision

2325 5
cancel
Showing results for 
Search instead for 
Did you mean: 
Rod_Gibson
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello guys… I’ve came across this issue… I’m working on a table with grouped records, and some currency amounts come from rollups and calculations that have been rounded previously by field type.

The issue is that in grouped view the SUM function is still considering “on the background” the amounts without rounding, thus adding them to the final amount.

See the image: 42fb826ee22cd13ed0dd62d318a7ce9235c2307b.PNG

The correct amount, of course, should be -$349,950.

Is there any way to change this behaviour? When dealing with rounded currencies, I think this is very important.

Thanks a lot and keep the great work!

Rodrigo.

5 Replies 5
Matt_Bush
Airtable Employee
Airtable Employee

The best way to change this behavior at this time is to use our Formula system to explicitly round the value.

You can use ROUND() in the configuration of the rollup field itself, for example ROUND(SUM(values)), which will cause the underlying value in each cell in this field to be rounded, reflecting the exact displayed value. Or you can create an additional formula field that references this field and uses ROUND().

Sorry that this behavior is opaque and we don’t offer easier ways to configure it. We will revisit this at some point in the future, but there are situations where the current behavior is useful that we want to preserve.

Rod_Gibson
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello Matt, thanks for the reply!

I followed your advice and it worked like a charm.

I totally understand your view about this feature, but I think that particularly when dealing with currencies this option should be a bit easier/clearer to work with.

Anyway, thanks again!

You can use ROUND() in the configuration of the rollup field itself, for example ROUND(SUM(values))…

Matt - Is this true of all/most numeric functions — that is, the enclosing function is applied to each individual field value prior to the rollup?

Thanks!

No, the enclosing function ROUND() is applied only to the single result of SUM(); it is not applied to the multiple individual values.

Ah, got it. That’s how I thought it would work, but I conflated the various SUMs.