Forum Discussion
ReadTheIron
1 year agoHelper III
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:
| Type | Name | Price | Calculated Column |
| Fruits | Apple | $1 | Apple, $1 per piece |
| Veggies | Spinach | $2 | Spinach, $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
- AlexisOlsonSuper User
&& is the logical AND operator. Try using & for concatenating strings instead.
- audreygerredSuper User
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") - ReadTheIronHelper III
That was it! Thank you!