?
Solved

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

Posted on 2011-09-21
9
Medium Priority
?
220 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
[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
  • Learn & ask questions
  • 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 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

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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
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.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

762 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