Cognito-forms – Calculations and repeating sections

cognito-forms

I have a repeating section in my form called 'Posts'. In this repeating section there is a currency calculation which displays a number based on other information entered in the section.

I want to create another calculation at the very bottom of the page (and outside of the repeating section) which displays the total of all the currency calculations in the repeating section. For example, if the currency calculation for Post 1 is $50, and the currency calculation for Post 2 is $40, this final calculation should show a total of $90.

However, when I try to create the calculation, I can't seem to reference any of the fields inside the repeating section. The calculation will only let me reference fields which are not in the repeating section.

Why is this? And is there any way around it?

Best Answer

For starters, check out our documentation on calculations, which covers the many ways you can perform calculations with repeating sections in Cognito Forms:

https://www.cognitoforms.com/support/2/calculations

For your specific example, if your repeating section is called Posts and contains a subtotal calculation field for each item called Total, the calculation to sum these up at the bottom of your form would be =Posts.Sum(Total).