Hi,
I'm trying to combine two separate fields into one SUM. Right now I'm taking one approach that works, though it seems to involve more steps than necessary.
I'll call the fields Data1 and Data2. I have individual queries that count all of the instances of Data1 and Data2. Once the instances are counted, a second query calculates the SUM for each field respectively.
Right now, I can't really combine the two SUMs into one SUM. This is the current query I'm using, but all it really does is display the two individual sums next to each other. I still have to do the calculation manually:
SELECT qryData1.SumOfData1, Sum(qryData2.Data2) AS SumOfData2
FROM qryData2, qryData2
GROUP BY qryData1.SumOfData1;
Thanks as always!
I'm trying to combine two separate fields into one SUM. Right now I'm taking one approach that works, though it seems to involve more steps than necessary.
I'll call the fields Data1 and Data2. I have individual queries that count all of the instances of Data1 and Data2. Once the instances are counted, a second query calculates the SUM for each field respectively.
Right now, I can't really combine the two SUMs into one SUM. This is the current query I'm using, but all it really does is display the two individual sums next to each other. I still have to do the calculation manually:
SELECT qryData1.SumOfData1, Sum(qryData2.Data2) AS SumOfData2
FROM qryData2, qryData2
GROUP BY qryData1.SumOfData1;
Thanks as always!