Power Query: Update Query by iterating through list of input parameters and append results to new cumulative file

Jls

New Member
Joined
Jun 28, 2012
Messages
5
I have a query which retrieves stock data by URL to www.morningstar.com. I also have a list of stock tickers and Morningstar IDs. What I want to do is to have PQ iterate through the list of stock tickers and refresh the query by updating the URL with the ID and to append the results of each query to a table that will hold the results of each query. I have everything sorted out except for the iteration part where PQ will loop through the list of stock tickers and pass the ID to the Source (URL string) before the query is refreshed and results appended to the cumulative table. The idea is that the list of stocks will be dynamic as tickers will be added or removed. I can of course just have a set of "static" queries that I modify each time I want to add or remove a ticker, but that doesn't appeal to me as a smart solution.
Would be grateful if anyone has some code or resources that could point me in the right direction. Have tried "everything" including asking ChatGPT but have not been able to find something that works. I guess I should add that I am not a very sophisticated PQ user although I am using PQ a lot for various data management tasks.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Good to hear you got the solution.
If you would like to post the solution then it is perfectly fine to mark your post as the solution to help future readers. Otherwise, please do not mark a post that doesn't contain a solution.
 
Upvote 0

Forum statistics

Threads
1,214,667
Messages
6,120,814
Members
448,990
Latest member
rohitsomani

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