Easy pivoting of SQL queries in Excel

Here we have a small sample of a SQL query report that shows us actual revenue across different products over a number of quarters. There’s nothing wrong with the data being returned but it is pretty difficult to do any comparison analysis.

So what if your task is to report back on actual revenue across the product categories over all the quarters in this report.

This would not be an easy query to write in SQL as we don’t always know which data will be returned by a query, but that’s where XLCubed can come to our rescue!

We just right-click on the column heading which we wish to pivot – in our case cDate and then select XLCubed and Pivot (XLCubed fills in the column heading) as below:

The report is now displayed as with the quarters across the page as columns.

This format is so much easier to read and we can quickly how each of the products are contributing (or not!) to the company’s revenue across a time period.