I'm creating a report with all of the sales made from each product category. I added a table that contains on the column side: Months and for Rows I have the Product Category (i.e. Chairs, Tables, etc.).
So it should be looking something like this:
Product | January | February | March | April
---------------------------------------------
Chairs | value | value | value | value
Tables | value | value | value | value
So the thing is that I need to calculate the total amount of chairs sold each month.
I created the query:
SELECT SUM(Quantity)
FROM Sales
WHERE PurchaseDate BETWEEN '2015-01-01' AND '2015-01-31'
That query is inside a Dataset, but I'm looking for a way to use this same Dataset but pass it or change the PurchaseDate range in order to calculate the rest of the sales per month.