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

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Misca

Well-known Member
Joined
Aug 12, 2009
Messages
1,609
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,109,411
Messages
5,528,621
Members
409,828
Latest member
99DodgeRam

This Week's Hot Topics

  • Change military grades into rank
    Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
  • VBA COUNTIF SOLUTION
    Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
  • INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
    Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...
  • Auto-Create a monthly Sign in sheet for preschool students
    The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class" School days are obviously Monday-Friday but...
  • VBA vlookup multiple results
    Hi folks, Hopefully someone out there can help. I have a list to vlookup which works (ish). the lookup only picks up the first instance of the...
  • Extract values for earliest/latest times
    I am trying to put together a formula to get the earliest start time, the latest end time from column A for each person in Column B-F without the...
Top