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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

VLOOKUP in DAX

Hello folks, 

I am kinda struggling past 2 days for a solution. 

 

I have data that was working fine with LOOKUPVALUE function but now the data is updated and 1 variable has multiple rows as output. This is throwing an error since LOOKUPVALUE doesn't work with multiple values as a result. I need to figure out a query that looks for all the matching rows and gives them as an output. 

 

For example: 

mdyavanapalli_0-1619201184229.png

Should give an output when written assuming lookupvalue function works -

LOOKUPVALUE(

COL1, ID=101)

 

mdyavanapalli_1-1619201296226.png

 

Appreciate your feedback on this. 

 

 

 

1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

Not totally clear on how you are using the result, but this measure expression may work.  This assumes the ID column is numeric.  If not, wrap it in quotes like "101".

 

MatchingValues = var vMatches = CALCULATETABLE(VALUES(Table[Col1]), Table[ID]=101)

return CONCATENATEX(vMatches, Table[Col1], ", ")

 

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

Since in Table1 there are no repetitions in Col 1, the LOOKUPVALUE() function in Table2 should work just fine.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
mahoneypat
Microsoft Employee
Microsoft Employee

Not totally clear on how you are using the result, but this measure expression may work.  This assumes the ID column is numeric.  If not, wrap it in quotes like "101".

 

MatchingValues = var vMatches = CALCULATETABLE(VALUES(Table[Col1]), Table[ID]=101)

return CONCATENATEX(vMatches, Table[Col1], ", ")

 

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

Thank you @mahoneypat I think this will open up a new door for my solution.  

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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