Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
Solved

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

Posted on 2011-09-21
Medium Priority
222 Views
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.

best regards
0
Question by:EuroCasaCar
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 4
• 4

LVL 120

Expert Comment

ID: 36573757
you can that by using a total query

select  propertyName,Sum(m2)
from tablex
group by propertyName
0

LVL 120

Accepted Solution

Rey Obrero (Capricorn1) earned 1500 total points
ID: 36573797
or you can use a crosstab query

TRANSFORM Sum(TableX.m2) AS SumOfm2
SELECT TableX.propertyName
FROM TableX
GROUP BY TableX.propertyName
PIVOT TableX.propertyName;
0

LVL 31

Expert Comment

ID: 36574142
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?
0

Author Comment

ID: 36574987
@Helen_Feddema

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

0

LVL 120

Expert Comment

ID: 36575007
EuroCasaCar,

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

Author Comment

ID: 36575079
@capricorn1

I know but in this case we need it.

0

LVL 120

Expert Comment

ID: 36575113
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.

0

Author Comment

ID: 36579181
Later today I will post a sample.
0

Author Comment

ID: 36580768

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.

0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
###### Suggested Courses
Course of the Month9 days, 20 hours left to enroll