Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

PROCV

Good afternoon!


I am having a hard time making a query as I would using procv in excel.

I need to analyze the column "product code" and "document" throughout the table and for each occurrence I have the return value of 1.

I do not know how to do the power query please if you can help me.


Thanks

 

 

 

forum.png

2 ACCEPTED SOLUTIONS
Jimmy801
Community Champion
Community Champion

Hello

 

to simulate PROVC in Power Query, use this function

(SearchList as list, SearchTerm as any, ResultList as list) as any =>

let
    Quelle = ResultList{List.PositionOf(SearchList, SearchTerm)}
in
    Quelle

 

Have fun

 

Jimmy

View solution in original post

Anonymous
Not applicable

Power query has the concept of merge which is more similar to SQL then PROCV. Learning it will lead to much faster solutions then any attempt to replicate vlookup within PQ.

 

Pick merger from the ribbon

Step1.PNG

Pick the two tables that you want to "vlookup" and select the columns that you wish to lookup.

Step2.PNG

 

The query will not look similar to the picture below.

Step3.PNG

 

Press the expand button on Table2 to pick the column that you want

Step4.PNG

 

You are then left with the result.

Step5.PNG

 

I have one warning about this approach. If the table that you are looking up has multiple values in it, then your result set will duplicate. You will have to determine how to handle this issue on a case by case basis.

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Power query has the concept of merge which is more similar to SQL then PROCV. Learning it will lead to much faster solutions then any attempt to replicate vlookup within PQ.

 

Pick merger from the ribbon

Step1.PNG

Pick the two tables that you want to "vlookup" and select the columns that you wish to lookup.

Step2.PNG

 

The query will not look similar to the picture below.

Step3.PNG

 

Press the expand button on Table2 to pick the column that you want

Step4.PNG

 

You are then left with the result.

Step5.PNG

 

I have one warning about this approach. If the table that you are looking up has multiple values in it, then your result set will duplicate. You will have to determine how to handle this issue on a case by case basis.

 

Jimmy801
Community Champion
Community Champion

Hello

 

to simulate PROVC in Power Query, use this function

(SearchList as list, SearchTerm as any, ResultList as list) as any =>

let
    Quelle = ResultList{List.PositionOf(SearchList, SearchTerm)}
in
    Quelle

 

Have fun

 

Jimmy

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors