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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
dw0120
Regular Visitor

Add on to existing Lookup Value

I have a column made up of a Look up value below...

NewColumn = LOOKUPVALUE('TABLE1'[Column1],'TABLE1'[Column2],TABLE2[Column3])
 
I need to add a If NewColumn is blank then pull from TABLE2[Column4]. How can I add that to the existing column above?
 
1 ACCEPTED SOLUTION
v-alq-msft
Community Support
Community Support

Hi, @dw0120 

 

Based on your description, I created data to reproduce your scenario.The pbix file is attached in the end.

Table1:

c1.png

 

Table2:

c2.png

 

You may create a calculated column as below.

NewColumn = 
var _val = LOOKUPVALUE(Table1[Column1],Table1[Column2],Table2[Column3])
return
IF(
    ISBLANK(_val),
    LOOKUPVALUE(Table1[Column1],Table1[Column2],Table2[Column4]),
    _val
)

 

Result:

c3.png

 

Best Regards

Allan

 

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

2 REPLIES 2
v-alq-msft
Community Support
Community Support

Hi, @dw0120 

 

Based on your description, I created data to reproduce your scenario.The pbix file is attached in the end.

Table1:

c1.png

 

Table2:

c2.png

 

You may create a calculated column as below.

NewColumn = 
var _val = LOOKUPVALUE(Table1[Column1],Table1[Column2],Table2[Column3])
return
IF(
    ISBLANK(_val),
    LOOKUPVALUE(Table1[Column1],Table1[Column2],Table2[Column4]),
    _val
)

 

Result:

c3.png

 

Best Regards

Allan

 

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

lbendlin
Super User
Super User

use the COALESCE() function.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors
Top Kudoed Authors