Solved

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

Posted on 2011-09-21
9
217 Views
Last Modified: 2012-05-12
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
0
Comment
Question by:EuroCasaCar
  • 4
  • 4
9 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 36573757
you can that by using a total query

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

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 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

by:Helen_Feddema
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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 

Author Comment

by:EuroCasaCar
ID: 36574987
@Helen_Feddema

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


0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
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

by:EuroCasaCar
ID: 36575079
@capricorn1

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

0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
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

by:EuroCasaCar
ID: 36579181
Later today I will post a sample.
Thank you for your help.
0
 

Author Comment

by:EuroCasaCar
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.

Thanks in advance!
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question