Multiple Value
|
You can create multiple values by combining a crosstab and cartesian query. Create a sample using the Northwind database to create both a Quantity and Quantity * Price value for each column.
TRANSFORM Sum(IIf([FldName]="Quantity",[Quantity],[Quantity]*[Order Details]![UnitPrice])) AS DaVal SELECT Products.ProductName FROM tblXtabColumns, Orders INNER JOIN (Products INNER JOIN [Order Details] ON Products.ProductID = [Order Details].ProductID) ON Orders.OrderID = [Order Details].OrderID WHERE (((Orders.OrderDate) Between #1/1/1998# And #3/31/1998#)) GROUP BY Products.ProductName PIVOT [FldName] & Month([OrderDate]);You will get two columns per month QtyXPriceN and QuantityN. |