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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

how to 'vlookup' powerbi table with multiple values

hi all,

 

i am new to PowerBI and am facing an issue, any comments or help is much appreciated.

 

i have 2 tables at the moment, table 1 and table 2 which looks like this:

 

Table1

type 1 , apple

type 1, apple

type 2, cheese

type 3, bake

type 3, bake

 

Table2

type 1 , chef1

type 1, chef2

type 2, cook

type 3, helper1

type 3, helper2

 

what i would like to achieve is below:

Table1

type 1 , apple , chef1

type 1, apple , chef1

type 2, cheese , cook

type 3, bake , helper1

type 3, bake, helper1

 

basically a 'vlookup' from table1 to table2 taking only the first value.

 

i have tried LOOKUPVALUE but it returns an error of 'multiple values was supplied where a single value was expected'

 

is there another way for me to achieve this?

 

any help is appreciated, thank you

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous ,

 

Try a new column in table 1

 

minx(filter(Table2, Table1[type] = Table2[Type] ) , Table2[Value] )

 

 

refer 4 ways (related, relatedtable, lookupvalue, sumx/minx/maxx with filter) to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

4 REPLIES 4
mangaus1111
Solution Sage
Solution Sage

hi @Anonymous ,

see my solution in power query

https://1drv.ms/u/s!Aj45jbu0mDVJkQfE8jZj3XGTet5A?e=470G5e

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

amitchandak
Super User
Super User

@Anonymous ,

 

Try a new column in table 1

 

minx(filter(Table2, Table1[type] = Table2[Type] ) , Table2[Value] )

 

 

refer 4 ways (related, relatedtable, lookupvalue, sumx/minx/maxx with filter) to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

is there a way to use the same formula but so it excludes blank values?

 

 

Anonymous
Not applicable

works like a charm! thank you very much sir!

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.