ProjectThree
New Member
- Joined
- Mar 21, 2019
- Messages
- 4
Hi all - I'm in the process of developing an MI dashboard for a set of business users, and I often get requests from these users for basic reports for the granular data.
I want to build a self service reporting tool within this dashboard; The solution that I envisage is a worksheet with form controls allowing a user to specify the data they want, and the filters that they would like to apply and a button then reading "get report". Depending on the options selected it would formulate a SQL query string using VBA, and then run that query against the Powerpivot data model within the spreadsheet. Once complete it would create a new workbook and populate it with the query data allowing the user to save as required.
What I wanted to know is if it actually possible to run a SQL query against a power pivot data model, and then how I would go about exporting the query data to a new workbook? Any code snippets or links to relevant threads would be much appreciated. (Though I couldn't find any relevant threads)
I want to build a self service reporting tool within this dashboard; The solution that I envisage is a worksheet with form controls allowing a user to specify the data they want, and the filters that they would like to apply and a button then reading "get report". Depending on the options selected it would formulate a SQL query string using VBA, and then run that query against the Powerpivot data model within the spreadsheet. Once complete it would create a new workbook and populate it with the query data allowing the user to save as required.
What I wanted to know is if it actually possible to run a SQL query against a power pivot data model, and then how I would go about exporting the query data to a new workbook? Any code snippets or links to relevant threads would be much appreciated. (Though I couldn't find any relevant threads)