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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
IAM
Helper III
Helper III

Power Query LookUp in another table

Hi all,

 

I have found so many (solved) posts, but I haven't managed to translate it to my situation, so I hope someone will help me.

 

In table IW38 I want to add a column M_Planner

 

That new column should look in table IW38 column Plannergroup and match that value to table PlGrp column Code

and return the value in table PlGrp column Planner

 

Can someone write te Mcode for this?

 

1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @IAM ,

You can add a custom column as below in the table IW38 in Power Query Editor, please find the details in the attachment.

= Table.AddColumn(#"Changed Type", "M_Planner", each PlGrp[Planner]{List.PositionOf(PlGrp[Code],[Plannergroup])})

yingyinr_0-1656056634420.png

In addition, you can refer the following blog to achieve it, there are two methods(merge method and add a custom column method) include in this blog.

VLOOKUP in Power Query Using List Functions

Merge methodMerge method

Add a custom column methodAdd a custom column method

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-yiruan-msft
Community Support
Community Support

Hi @IAM ,

You can add a custom column as below in the table IW38 in Power Query Editor, please find the details in the attachment.

= Table.AddColumn(#"Changed Type", "M_Planner", each PlGrp[Planner]{List.PositionOf(PlGrp[Code],[Plannergroup])})

yingyinr_0-1656056634420.png

In addition, you can refer the following blog to achieve it, there are two methods(merge method and add a custom column method) include in this blog.

VLOOKUP in Power Query Using List Functions

Merge methodMerge method

Add a custom column methodAdd a custom column method

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

In the end, I merged my tables. This is the best way indeed 🙂

@IAM , Thanks for the update.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.