Data sets (Preview) Troubleshooting Guide
You're trying to use a string as a boolean
You may encounter the following error when using a formula in your data flow:
You're trying to use a string as a boolean. Consider using a boolean expression or casting the value to boolean.

This error occurs when a formula expects a boolean value (TRUE or FALSE), but receives a string instead.
For example, logical functions and operators such as IF, !, AND(), OR() , etc. expect boolean values as their arguments. If the column you're using contains a string instead of actual boolean values, the formula may return this error.
How to fix it
Open the affected data flow and go to the Data sets section.
Check the formulas you've added. Formulas can be configured at both the data source and data set levels, so make sure to review formulas in both places.
Look for logical functions or operators, such as:
IF!AND()OR()Other logical functions
Check the data type of the column used in the formula. Make sure it contains a boolean value rather than a string.
If the value is stored as a string, update your formula to use a boolean expression or convert the value to a boolean before using it in a logical function. Example: One common case is when you have a formula like
IF({{column}},1,0)and the{{column}}is a string. This can trigger the error, so instead, you can specifyIF(LENGTH({{column}})>0,1,0)
Last updated
Was this helpful?
