Part 18 - Make a PivotTable
based on the results of a SQL query
EXCEL 2016
On the Insert tab of the
Ribbon choose PivotTable
In the Create PivotTable
dialog choose Use External Data Source
Click Choose Connection
Choose a DSN
Microsoft Query opens. Write a
SQL query
Click the Return Data button
(If you get a "Data Source Reference is not valid" error
message, click the Smile button in Excel to alert
Microsoft that they need to fix this.)
EXCEL 2011
On the Data tab of the
RIbbon, in the Analysis group of commands,
click the small triangle next to the PivotTable
button.
From the pop-up menu choose Create
Manual PivotTable to display the Create PivotTable
dialog box.
In the Create PivotTable
dialog, click the Use External Data Source Radio
button.
In the Create PivotTable
dialog, click the Get Data button to display the
data source chooser.
In the Data Source Chooser select
a data source, then click the OK button to
launch Microsoft Query.
When you are done making your
query, in Microsoft Query click the Return Data button
to return to the Create PivotTable dialog.
Click the OK button to
return the result set to an empty Excel PivotTable, where
you see the column names waiting for you to use in your
PivotTable.