---
title: "Table type entity: how to check sum of attributes in a column?"
url: "https://openforis.support/questions/1301/table-type-entity-how-to-check-sum-of-attributes-in-a-column"
tags: ["collect"]
status: "answered"
score: 0
answer_count: 3
asked: "2017-05-30T08:55:59"
last_activity: "2017-06-01T11:59:32"
source: "Open Foris Support - Q&A Forum"
license: "Copyright Open Foris, 2026. Some rights reserved under creative commons license."
---

# Table type entity: how to check sum of attributes in a column?

Asked by Lauri (OF) on 2017-05-30

Hi Team,

We have in the Collect survey an entity [multiple, table layout] with 3 numeric type attributes, with 1-4 entries (rows). We need to check that sum of each column is 100. What is the best way to do this verification in Collect? 

Thanks, Lauri


## Answer (score 0, by Stefano (OF) on 2017-05-30)

Link: https://openforis.support/questions/1301/table-type-entity-how-to-check-sum-of-attributes-in-a-column/1302

Hi Lauri,  
What you can do is to create 3 calculated attributes outside of the entity and define for each of them an expression like this:  
`sum(ENTITY_NAME/ATTRIBUTE_NAME)`   
so that the user can keep track of the current sum of each column. Also these calculated attributes can be used to define some validation rules that use the sum.  
Thanks,  
Open Foris Team


## Answer (score 0, by Lauri (OF) on 2017-05-31)

Link: https://openforis.support/questions/1301/table-type-entity-how-to-check-sum-of-attributes-in-a-column/1303

Hi Stefano,

otherwise fine, but validation does not work because there seems to be this limitation for a calculated attribute:
*survey.validation.attribute.cannot_specify_checks_for_calculated_attribute*

Regards, Lauri


## Answer (score 0, by Stefano (OF) on 2017-06-01)

Link: https://openforis.support/questions/1301/table-type-entity-how-to-check-sum-of-attributes-in-a-column/1304

Hi Lauri,  
Of course the validation of the calculated attribute does not work because it cannot be applied... Instead I was talking about the validation of some other attributes where you can use the newly created calculated attributes.  
Thanks,  
Open Foris Team
