Pivot Table Query add Formula columns

  • Thread starter Thread starter ardi
  • Start date Start date
A

ardi

Hello,

I have created my pivot table with this MS Access query ,
transform max(value)
select hour from mytable group by label
pivot label

below is the Table output from pivot table query :

Hour A B C
1 15 14 21
2 22 23 24
3 21 33 11
4 10 10 10

I would like to added one columns with this simple formula (A+B +C )/
3
so the output like this.

Hour A B C Avg
1 15 14 21 16.67
2 22 23 24 23
3 21 33 11 ....
4 10 10 10


based on that formula .. Is there
a way to do that?. Please let me know.

Thanks in advance
 
Simpler might be

TRANSFORM Max(Value) as TheMax
SELECT Hour, Avg(Value) as TheAverage
FROM MyTable
GROUP BY HOUR
PIVOT Label

By the way, posting the actual query string makes life a lot easier. Your
posted "sample" contained an error that would generate a syntax error.

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
 
Back
Top