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
RandomFre
Frequent Visitor

Multiple LOOKUPVALUE

Hi, im new in power bi and query and I would like to use the "Alternate" to evaluate a second condition of the function: 

 

LOOKUPVALUE( Table2[age], Table2[ID], Table1[ID], (LOOKUPVALUE (Table2[age], Table2[Class], Table1[Class], -1))

 

In the first evaluation of the LOOKUPVALUE, if the ID is present in the Table2, then age will be returned. Fine (works) 

else, if the ID is not present, i would like to search for class column (this is my use case). 
but the formula return BLANK() and not the second function, at least i would like to see "-1" in the wrost case (if no id or class are present in the table2)

Whats wrong? Thanks. 

1 REPLY 1
johnt75
Super User
Super User

The code works fine with some sample data so I suspect the problem is in your data. You could try creating 2 calculated columns, one using each version of the LOOKUPVALUE, then investigate further into rows where you are getting blank or -1.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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