Forum Discussion

ReadTheIron's avatar
ReadTheIron
Helper III
1 year ago
Solved

Cannot Convert Value of Type Text to Type True/False

I have the following table. I'm trying to create a calculated column as shown:

TypeNamePriceCalculated Column
FruitsApple$1Apple, $1 per piece
VeggiesSpinach$2Spinach, $2 per pound

 

I'm trying to create the calculated column using the following code:

=IF([Type]="Fruits", [NAME] &&","&& [Price] && " per piece", [Name] &&","&& [Price] && " per pound")

 

I get the error "Cannot convert value 'Fruits' of type Text to type True/False"

 

I feel like I'm missing something very obvious but I haven't found the answer in any of the other questions on this topic I've read. Any help appreciated!

  • && is the logical AND operator. Try using & for concatenating strings instead.

3 Replies

  • && is the logical AND operator. Try using & for concatenating strings instead.

  • Hi! I used this:

    Concat = IF('Table (4)'[Type]="Fruit", 'Table (4)'[Name]&", $" & 'Table (4)'[Price] & " per piece", 'Table (4)'[Name]&", $" & 'Table (4)'[Price] & " per pound")