PowerQuery pull back selected date

mahmed1

Well-known Member
Joined
Mar 28, 2009
Messages
2,302
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi All

I have set up powerQuery connection to pull back data from a database - At the minute it pulls back everything

Is it possible to only pull back data from a start date and end date in excel?

so say im A1 i have startdate and A2 i have enddate - Can i only pull back that data so im not pulling more data than needed?

And also in VBA - im refreshing all the powerQuery connections...I recorded a macro and the macro code first selects the sheet and then uses Selection.ListObject.QueryTable.Refresh BackgroundQuery:=False

I tried to not use the select method and just refresh it by using the following thisworkbook.connections(“tblQuery”).refresh but that fails
how can i avoid using select?
 
(It was so much easier with older version imo)
older version of what?

example.png


there are blue tables
- small is a source of range of dates
- bigger is "your" data (can be directly loaded from database into Power Query)
check in Name Manager what the names they have

1) A1: Enter Start Date NO
2) B1: Enter End Date NO
3) Generate a list of dates in Excel between those 2 dates (say this table is called DateList) NO
4) Get data from database NO
5 Get data from Excel NO
6) Join date table to database date NO
Now how do i do a left outer join in PowerQuery?
with Merge Queries you will see that choice

I suggest to read this carefully
sorry but no pain, no gain
 
Upvote 0

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Forum statistics

Threads
1,215,024
Messages
6,122,729
Members
449,093
Latest member
Mnur

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