Link to home
Start Free TrialLog in
Avatar of EuroCasaCar
EuroCasaCar

asked on

Is it possible to sum from multiple fields in calcutalted Filed?

Is it possible to sum from multiple fields in calcutalted Filed?
I have a table with square value (m2). See figure:

-------------------------------------------------- -----------------------------
PropertyID propertyName m2
-------------------------------------------------- -----------------------------
1           castle           200
2           tent              120
3           castle          310
4           yard             540
-------------------------------------------------- -----------------------------

I want to sum castle (200 + 310 = 510) in a Calculated Field. Is it possible or do I make a query for it. In that case, I am grateful for an example.

Thanks in advance!

best regards
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

you can that by using a total query

select  propertyName,Sum(m2)
from tablex
group by propertyName
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This can also be done with a PivotTable.  Where do you want to see the results of this calculation?  A form, a report, a chart?
Avatar of EuroCasaCar
EuroCasaCar

ASKER

@Helen_Feddema

Thank you. I want to store the value in a table. The same table (tablex).


EuroCasaCar,

it is not advisable to store calculated data in the table. you can always derived the accurate information using a query.
@capricorn1

Thank you for your answers.
I know but in this case we need it.

ok, post sample values with field names that show the information with the calculated value after you run an update query or make table query.

Later today I will post a sample.
Thank you for your help.

I have a table with a number of fields. Among other fields, "square", "TotalSale2011" and "Rent2011".

I would by a new field (Calculated field) make a calculation:
sum (TotalSales2011) / square meter.

So get the sum of TotalSales2011 (all items) divided by the square of the unique item. Is it possible to do so via Calculated Field.

Thanks in advance!