Hi,
I have a SQL table with sales data that I want to "categorize" in a pivot table.
InvoiceLines:
SKU
| Price | Cost | Units | Date |
---|
123 | 120 | 90 | 2 | |
124 | 98 | 45 | 1 | |
125 | 75 | 70 | 1 | |
I want to categorize my pivot table to look like this:
| Jan | Feb | Mar |
---|
Sales | sum(Price*Units) | sum(Price*Units) | sum(Price*Units) |
Cost | sum(Cost*Units) | sum(Cost*Units) | sum(Cost*Units) |
Profit | sum((Price-Cost)*Units) | sum((Price-Cost)*Units) | sum((Price-Cost)*Units) |
How do I create categories like in the left column? Any help are appreciated.