What's the best way of pulling data from the data model of another Excel workbook via PowerQuery?

alex1alex

Board Regular
Joined
Sep 12, 2014
Messages
57
The set up is that I have an excel workbook where I do "stuff" in the Data Model.

I'd like to use that stuff as an input for another Excel workbook.(is this a common setup?)
Up until now I've been doing one of the following:
- Loading that particular sheet of the data model back into the workbook as a table (via the Load To)
- Using a PivotTable to grab a sub-set of the data model (and either querying it via PowerQuery dicrectly or saving it as CSV and querying that file.)

For all of the above, the Con is that, since you are loading the data as text back into the Worksheet the size of the worksheet balloons. Additionally, it's really time consuming to go and do a refresh. Using the PivotTable to grab a subset of the data model takes less space (since I can filter down how much data I pull back.) But it's sort of fiddly. (you don't get a nice structured table and it's still pretty big. Also, it seems like an needless step.)

Ideally, I'd like to query the data model directly from PowerQuery.
Alternatively, I'd like to be able to filter the Load To table so that I can specify the columns and rows that are pulled in.
Or something else I hadn't though up :)

Looking forward to hearing ideas.
Kind Regards,
Alex
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
You can use DAX Studio to connect to the datamodel in your main spreadsheet. Write a query to get the table you need and export it to csv. You can then bring it back into another workbook via PQ.
 
Upvote 0
Interesting...

Can you recommend a getting started with DAX Studio tutorial? (I've read about it but couldn't find anything on youtube....and last time I tried using it wasn't intuitive enough for me to figure it out on my own.)

You can use DAX Studio to connect to the datamodel in your main spreadsheet. Write a query to get the table you need and export it to csv. You can then bring it back into another workbook via PQ.
 
Upvote 0

Forum statistics

Threads
1,214,970
Messages
6,122,514
Members
449,088
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top