I am attempting to combine 2 crosstab queries and I keep getting the "Syntax error in TRANSFORM statement".
TRANSFORM Sum(tblPlanSavings.[PlanSavings]) AS SumOfPlanSavings
SELECT tblPlanSavings.[BusinessUnit], tblPlanSavings.[PlantName], tblPlanSavings.[Category], Sum(tblPlanSavings.[PlanSavings]) AS [Total Of PlanSavings]
FROM tblPlanSavings
GROUP BY tblPlanSavings.[BusinessUnit], tblPlanSavings.[PlantName], tblPlanSavings.[Category]
PIVOT Format([MonthYear],"mmm") In ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug"," Sep","Oct","Nov","Dec")
UNION ALL
TRANSFORM Sum(qryProcurementPlantSavingsAllMonths.Savings) AS SumOfSavings
SELECT qryProcurementPlantSavingsAllMonths.BusinessUnit, qryProcurementPlantSavingsAllMonths.PlantName, qryProcurementPlantSavingsAllMonths.Category, Sum(qryProcurementPlantSavingsAllMonths.Savings) AS [Total Of Savings]
FROM qryProcurementPlantSavingsAllMonths
GROUP BY qryProcurementPlantSavingsAllMonths.BusinessUnit, qryProcurementPlantSavingsAllMonths.PlantName, qryProcurementPlantSavingsAllMonths.Category
PIVOT Format([MonthYear],"mmm") In ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug"," Sep","Oct","Nov","Dec");