If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
tough one regarding adding two columns :)
Hi
I have a table with one row of data and 10 columns that are all total figures of a previous table. example is below: Sum1 sum 2 sum3 2 49 0 etc etc I tried to create a new query to add sum1 together with sum2 to create a new total figure using this: Total of sum1 and sum2: [sum1]+[sum2] for some reason it says it needs to be part of an aggregate function. I have other fields in the query besides this however, and they calculate sums from another table. Any help would be great Thanks -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...eries/200806/1 |
#2
|
|||
|
|||
tough one regarding adding two columns :)
Your question doesn't mean anything. If can post your table structure and how you arrived at your query that would be great. "Accessghostrider via AccessMonster.com" wrote: Hi I have a table with one row of data and 10 columns that are all total figures of a previous table. example is below: Sum1 sum 2 sum3 2 49 0 etc etc I tried to create a new query to add sum1 together with sum2 to create a new total figure using this: Total of sum1 and sum2: [sum1]+[sum2] for some reason it says it needs to be part of an aggregate function. I have other fields in the query besides this however, and they calculate sums from another table. Any help would be great Thanks -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...eries/200806/1 |
#3
|
|||
|
|||
tough one regarding adding two columns :)
scubadiver wrote:
Your question doesn't mean anything. If can post your table structure and how you arrived at your query that would be great. Hi [quoted text clipped - 15 lines] Thanks ? I posted the fields and the figures and what i wanted? -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...eries/200806/1 |
#4
|
|||
|
|||
tough one regarding adding two columns :)
"I have a table with one row of data and 10 columns that are all total figures of a previous table." Does this mean you have 10 fields with a totals query (which suggests non-normalisation) or is it a cross tab query? That you have an error message tells me something is obviously wrong somewhere. "Accessghostrider via AccessMonster.com" wrote: scubadiver wrote: Your question doesn't mean anything. If can post your table structure and how you arrived at your query that would be great. Hi [quoted text clipped - 15 lines] Thanks ? I posted the fields and the figures and what i wanted? -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...eries/200806/1 |
#5
|
|||
|
|||
tough one regarding adding two columns :)
scubadiver wrote:
"I have a table with one row of data and 10 columns that are all total figures of a previous table." Does this mean you have 10 fields with a totals query (which suggests non-normalisation) or is it a cross tab query? That you have an error message tells me something is obviously wrong somewhere. Your question doesn't mean anything. If can post your table structure and how you arrived at your query that would be great. [quoted text clipped - 6 lines] ? I posted the fields and the figures and what i wanted? heres the table, i did give an example in the first post: column name: sum1 sum2 sum3 sum4 sum5 sum6 sum7 sum8 sum9 sum10 Record figu 2 5 6 49 66 75 3 5 8 20 -- Message posted via http://www.accessmonster.com |
#6
|
|||
|
|||
tough one regarding adding two columns :)
I *think* your error is coming from the fact that you are trying to sum columns that have been previously summed. What I think you should do is calculate the total on the original scores and then use that as the source for the second table. I think that should work. "Accessghostrider via AccessMonster.com" wrote: scubadiver wrote: "I have a table with one row of data and 10 columns that are all total figures of a previous table." Does this mean you have 10 fields with a totals query (which suggests non-normalisation) or is it a cross tab query? That you have an error message tells me something is obviously wrong somewhere. Your question doesn't mean anything. If can post your table structure and how you arrived at your query that would be great. [quoted text clipped - 6 lines] ? I posted the fields and the figures and what i wanted? heres the table, i did give an example in the first post: column name: sum1 sum2 sum3 sum4 sum5 sum6 sum7 sum8 sum9 sum10 Record figu 2 5 6 49 66 75 3 5 8 20 -- Message posted via http://www.accessmonster.com |
#7
|
|||
|
|||
tough one regarding adding two columns :)
Remember that if you have fields for individual scores then there must be a good reason for it because, strictly, it isn't properly normalised. If you have the scores in separate records within one table then you will find it so much easier to add them up! "Accessghostrider via AccessMonster.com" wrote: scubadiver wrote: "I have a table with one row of data and 10 columns that are all total figures of a previous table." Does this mean you have 10 fields with a totals query (which suggests non-normalisation) or is it a cross tab query? That you have an error message tells me something is obviously wrong somewhere. Your question doesn't mean anything. If can post your table structure and how you arrived at your query that would be great. [quoted text clipped - 6 lines] ? I posted the fields and the figures and what i wanted? heres the table, i did give an example in the first post: column name: sum1 sum2 sum3 sum4 sum5 sum6 sum7 sum8 sum9 sum10 Record figu 2 5 6 49 66 75 3 5 8 20 -- Message posted via http://www.accessmonster.com |
#8
|
|||
|
|||
tough one regarding adding two columns :)
scubadiver wrote:
Remember that if you have fields for individual scores then there must be a good reason for it because, strictly, it isn't properly normalised. If you have the scores in separate records within one table then you will find it so much easier to add them up! "I have a table with one row of data and 10 columns that are all total figures of a previous table." [quoted text clipped - 16 lines] Record figu 2 5 6 49 66 75 3 5 8 20 Scuba cheers for looking into this. The error is most likely that i am trying to add two already summed figures together i worked around this by not creating the summed table and going off a few more columns. Pointless me writing what i found as its not useful however if anyone ever reads this heres a helpful formula when summing up things: Sum(IIf([Variable]="Yes",[Field to be summed],"0")) kind regards ghost -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...eries/200806/1 |
#9
|
|||
|
|||
tough one regarding adding two columns :)
Whoops, forgot to mention that the formula above lets you say only count a
field if another field has a value that you want. Ghost Accessghostrider wrote: Remember that if you have fields for individual scores then there must be a good reason for it because, strictly, it isn't properly normalised. If you [quoted text clipped - 6 lines] Record figu 2 5 6 49 66 75 3 5 8 20 Scuba cheers for looking into this. The error is most likely that i am trying to add two already summed figures together i worked around this by not creating the summed table and going off a few more columns. Pointless me writing what i found as its not useful however if anyone ever reads this heres a helpful formula when summing up things: Sum(IIf([Variable]="Yes",[Field to be summed],"0")) kind regards ghost -- Message posted via http://www.accessmonster.com |
Thread Tools | |
Display Modes | |
|
|