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! Request now

Reply
Anonymous
Not applicable

Calculated Column IF + LOOKUPVALUE ( "expressions that yield variant data-type cannot be used...")

Hi everyone,

I'm trying to make a new calculated column using the IF function, but when I complete the function, Power BI tells me I can't create variable results in a calculated column,

This is my function:

NewColumn =
IF
(
'Table1'[Column1] = "3000";
LOOKUPVALUE('Table2'[Column1];''Table2'[Column2];'Table1'[Column2]);
'Table1'[Column1])


Basically, I'm checking if the value of column 1 is 3000, then I call a lookupvalue function to get the information from another table, if the value is not 3000, I call again the original column 1.

Then Power BI shows me "expressions that yield variant data-type cannot be used to define calculated columns".

Is there any way I can proceed with this?

I can't creat a conditional column in Power Query because there is a lot of conditions, that I find the Table2, that's why I'm trying to proceed with the calculated column option.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , hope data type 'Table2'[Column1] and 'Table1'[Column1] is same. this seem like error because of that

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

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , hope data type 'Table2'[Column1] and 'Table1'[Column1] is same. this seem like error because of that

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.