Forum Discussion
KT9
2 years agoRegular Visitor
DAX
Hi all, I am new to power BI. trying to create a calculated column using DAX. But its throwing me the error says that " Expressions that yield variant data-type cannot be used to define calculated co...
amitchandak
2 years agoSuper User
KT9 , seem like Numeric_Result a number data type. You can not have two datatype in the same column. I added additional code to convert it to a string
Result =
SWITCH(TRUE(),
Tablename[Final] = "Negative", "Negative",
Tablename[Final] = "Positive" && Tablename[Type] = "ABCD", max(Tablename[Numeric_Result]) & "" )