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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
OmarAl
Regular Visitor

Lookup Value from different Rows - Power Query

Hello everyone,

I hope you're doing great! I'm trying to look up a value in certain column and replace it with identical value in different row. Can someone please recommend how to do so? 

OmarAl_0-1714557089023.png

 

Whenever a PO is #/# I would like to search in Document Text for identical column and replace the #/# with the PO matching in the new found row!

 

Sounds a bit complicated but I tried using Custom If column, but couldn't make the lookup function properly.

 

Bestr regards,

Omar

 

 

3 REPLIES 3
Anonymous
Not applicable

 

Thanks for the reply from @Uzi2019 , please allow me to provide another insight: 

Hi  @OmarAl ,

 

Here are the steps you can follow:

1. In Power Query – Add Column – Custom Column.

vyangliumsft_1-1714629512640.png

2. Enter the following code .

if [PO] = "#/#" then [Document] else [Custom]

3. Result:

vyangliumsft_2-1714629512643.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Hi Liu, I appreciate your help! But I would really like to replace the #/# with a PO number that is in dfifferent row. In example , the first #/# would ideally be replaced by 400500600 because it's matched witht the same text of Columne Document Text in row 2

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors