Power Query - Looping through table values

Tiger9136

New Member
Joined
Jul 10, 2017
Messages
18
Please can someone help me:

I need to pull two different web queries - First Query I run returns a table of items:

00001 - Coffee
00007 - Creamer
00019 - Filters

for example

The second query is coming from a different web source with the same identifier "00001" "00007" etc..

I need to run the next query and loop through what would be column1 and return the cost:

00001 - Coffee - 9.95
00007 - Creamer - 12.89
00019 - Filters - 0.99

Can some one point me in the right directions to use the identifier as a parameter to loop and pull the cost in for each item?

Thanks
 

Some videos you may like

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

Misca

Well-known Member
Joined
Aug 12, 2009
Messages
1,625
Join the two queries together using the Merge Queries on ID Numbers and expand the Price column from the merged tables.

Sounds more complicated than it is. Try searching YouTube for Power Query Merge Tables and you'll see how easy it really is.
 

Tiger9136

New Member
Joined
Jul 10, 2017
Messages
18
I can do that, the problem is on the second query I have to pull 10's of thousands of records to find all the identifier's that is why I want to use the identifier or key as a parameter to pull only the data that matches.
 

Tiger9136

New Member
Joined
Jul 10, 2017
Messages
18
Maybe this will help

Query #1: Web query pulls data based on a filter value of a single Dispatch type "PM's" Which returns a table like the image below:



Query 2 would pull the Labor cost for each PM. The labor cost is pulled from a different web query with the common connection of the "Dispatch#" in column 1 and cannot be filtered by dispatch type, so merging queries works but I have to pull 100's of thousands of records to find all the matching dispatch #'s.

To clean this up I want to use the "Dispatch #" as the parameter from Query 1 and iterate through each dispatch number to pull the labor cost in Query #2.

I am lost and don't know where to start. Can Someone please help with this?

tia
 

Watch MrExcel Video

Forum statistics

Threads
1,113,890
Messages
5,544,887
Members
410,643
Latest member
sng
Top