Power Query, Limit amount of data being loaded. Always want to load entire SQL server table

Jeffrey Green

Well-known Member
Joined
Oct 24, 2007
Messages
1,021
[FONT=&quot]I am pretty new to PQ so forgive my butchery of the terminology.[/FONT]
[FONT=&quot]I have an excel spreadsheet with a table on it. About 40,000 rows. Loaded in PQ to Connection only[/FONT]
[FONT=&quot]I can import that into a PQ with a problem.[/FONT]
[FONT=&quot]I need to compare those 40,000 rows against the data in an ODBC SQL Server connection with over 4 million rows.[/FONT]
[FONT=&quot]When i create the query for the SQLServer connection, i filter the date range to the last 90 days. This should limit my table to about 90,000 rows. I want to load this to a Connection Only, and i think i did that correctly. But when I close and load, PQ goes out and pulls all 4million rows, taking about 30 minutes.[/FONT]
[FONT=&quot]Then, when i merge the queries, using a left join, PQ again goes out and pulls all 4 million rows again.[/FONT]
[FONT=&quot]What do i have to do to get PQ to only load the ~90,000 Rows? [/FONT]
[FONT=&quot]Part two of question. When i merge these queries (i will have three queries to merge total), do i load each query to Connection Only, and not to the Data Model, except for the last merged query that has my desired output, or should i be loading the query to the Data Model? [/FONT]
[FONT=&quot]thanks [/FONT]
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

Forum statistics

Threads
1,216,036
Messages
6,128,432
Members
449,452
Latest member
Chris87

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