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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ahuhn
Advocate I
Advocate I

Column = IF(Table3[size]=1,CONCATENATE("*",Table3[size]),0)

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

Picture1.png

 

 

suggestions welcome

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

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")

View solution in original post

Anonymous
Not applicable

Maybe you can try the following DAX

 

Column = IF(Table1[Size]=1,CONCATENATE("*",Table1[Size]),"0")

2018-10-10_17-11-23.jpg

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Maybe you can try the following DAX

 

Column = IF(Table1[Size]=1,CONCATENATE("*",Table1[Size]),"0")

2018-10-10_17-11-23.jpg

 

Anonymous
Not applicable

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")

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.