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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.

Top Solution Authors