Forum Discussion
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:
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.
Anonymous , hope data type 'Table2'[Column1] and 'Table1'[Column1] is same. this seem like error because of that
1 Reply
- amitchandak
Super User
Anonymous , hope data type 'Table2'[Column1] and 'Table1'[Column1] is same. this seem like error because of that