I have a cross tab query that I am putting on a report. The months 1,2,3..12 print on the top. I need to calculate the difference in month 1 between 2005 & 2004, then month 2, etc. Here is my crosstab query below:
TRANSFORM Sum([sales query 2004-2005].Quantity) AS SumOfQuantity
SELECT [sales query 2004-2005].PlantID, [sales query 2004-2005].ProductID, [sales query 2004-2005].Year, Sum([sales query 2004-2005].Quantity) AS [Total Of Quantity]
FROM [sales query 2004-2005]
GROUP BY [sales query 2004-2005].PlantID, [sales query 2004-2005].ProductID, [sales query 2004-2005].Year
PIVOT [sales query 2004-2005].Month;
The sum function works great but I really need the difference in 2005-2004. Thanks for any help.
TRANSFORM Sum([sales query 2004-2005].Quantity) AS SumOfQuantity
SELECT [sales query 2004-2005].PlantID, [sales query 2004-2005].ProductID, [sales query 2004-2005].Year, Sum([sales query 2004-2005].Quantity) AS [Total Of Quantity]
FROM [sales query 2004-2005]
GROUP BY [sales query 2004-2005].PlantID, [sales query 2004-2005].ProductID, [sales query 2004-2005].Year
PIVOT [sales query 2004-2005].Month;
The sum function works great but I really need the difference in 2005-2004. Thanks for any help.