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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Daniel_Fdrvc
Helper I
Helper I

(V)Lookup only to rows with specific values

Hi all,

 

i've stucked. I have two tables: Table1 and Table2.
In Table2 i have column with values (Table2[Status]) that i need to vlookup to Table1, but only to rows which contains in column Table1[Product] = "Out". If there is other value than "Out" should leave blank. Both tables have same column [ID] to use in vlookup function. No ideas how to do that... Thank you in advance for any suggestions.

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

Hi, @Daniel_Fdrvc 

According to the error message, you can change the measure like this and try if it can work:

Column =

IF(Table1[Product]="Out",

CALCULATE(MAX(Table2[Status]),FILTER(Table2,[ID]=Earlier(Table1[ID])))

,0)

 

If you can not get what you want, you can post some sample data(without sensitive data) and your expected result.

How to Get Your Question Answered Quickly 

 

Best Regards,

Community Support Team _Robert Qin

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

3 REPLIES 3
v-robertq-msft
Community Support
Community Support

Hi, @Daniel_Fdrvc 

According to the error message, you can change the measure like this and try if it can work:

Column =

IF(Table1[Product]="Out",

CALCULATE(MAX(Table2[Status]),FILTER(Table2,[ID]=Earlier(Table1[ID])))

,0)

 

If you can not get what you want, you can post some sample data(without sensitive data) and your expected result.

How to Get Your Question Answered Quickly 

 

Best Regards,

Community Support Team _Robert Qin

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

Daniel_Fdrvc
Helper I
Helper I

Column = IF(Table1[Product]="Out",LOOKUPVALUE(Table2[Status],Table2[ID],Table1[ID]),0) returns error "a table of multiple values was supplied where a single value was expected"

@Daniel_Fdrvc , seem like there are more than one value in another table.

Try this

 

IF(Table1[Product]="Out", maxx(filter(Table2,Table2[ID]= Table1[ID]),Table2[Status] ) ,0)

 

refer my video on the same : https://www.youtube.com/watch?v=czNHt7UXIe8

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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