Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have a table, and want to examine the value of a column, then start it with an * if it meets a condition. Unfortunately, I receive the following error:
Column = IF(Table3[size]=1,CONCATENATE("*",Table3[size]),0)
"Expressions that yield variant data-type cannot be used to define calculated columns."
Where as:
Column = CONCATENATE("*",Table3[size]) works
I followed suggestions from https://community.powerbi.com/t5/Desktop/Expressions-that-yield-variant-data-type-cannot-be-used-to/... to no avail
I also tried converting int to string, as per https://community.powerbi.com/t5/Desktop/DAX-function-for-converting-a-number-into-a-string/td-p/507... to no avail.
Here is my data
suggestions welcome
Solved! Go to Solution.
The problem is:
The '0' at the end. It is numeric type.
Use this and it will work:
Column = IF(Table1[Size]=1,"*"&Table1[Size],"0")
Maybe you can try the following DAX
Column = IF(Table1[Size]=1,CONCATENATE("*",Table1[Size]),"0")
Maybe you can try the following DAX
Column = IF(Table1[Size]=1,CONCATENATE("*",Table1[Size]),"0")
The problem is:
The '0' at the end. It is numeric type.
Use this and it will work:
Column = IF(Table1[Size]=1,"*"&Table1[Size],"0")