Tableau error Type mismatch
Can't compare string and float values
Your field holds numbers, but Tableau reads it as text. Comparing text with a decimal like .80 is not allowed, so convert the field to a number first.
Which formula raises it, and what fixes it?
IF [Score] < .80 THEN 'Does Not Meet' ELSE 'Meets' ENDThe xmetric engine rejects it too.
IF FLOAT([Score]) < .80 THEN 'Does Not Meet'
ELSE 'Meets'
ENDOn each of the 3 example rows it returns:
| Region | Score | Result |
|---|---|---|
| East | 0.92 | Meets |
| West | 0.78 | Does Not Meet |
| West | 0.85 | Meets |
Why it works. FLOAT() turns the text "0.78" into the number 0.78, so the comparison works. A value that isn't a number becomes null and falls to the ELSE branch. To fix it everywhere, change the field's type to Number (decimal) in the data source.
The 3 example rows
Region | Score |
|---|---|
| East | 0.92 |
| West | 0.78 |
| West | 0.85 |
What else raises this message?
Raises it
IF [Score] = 1.0 THEN 'Perfect' ENDFixed
IF FLOAT([Score]) = 1.0 THEN 'Perfect' ENDConvert the text column once, with FLOAT, before comparing it to a decimal number.
Checked on the xmetric engine: the first fails, the fix runs.
Raises it
[Score] > 0.5Fixed
FLOAT([Score]) > 0.5The same conversion works in a plain comparison used as a filter or a color.
Checked on the xmetric engine: the first fails, the fix runs.
Does my formula have this problem?
Paste your formula and run it on the example rows. It uses the fields [Region], [Score]; rename yours to match.
Runs in your browser on the xmetric engine. Nothing is uploaded.
Which functions does this involve?
What do people ask about this error?
Why is my number column text?
A column becomes text when some values aren't numbers: N/A, a percent sign, a thousands separator in another locale. Fix the field type in the data pane, or clean the values before FLOAT.
What does FLOAT return for values that aren't numbers?
NULL. Rows with N/A drop out of numeric comparisons instead of breaking the calculation.
Where is this message documented?
- Where the message is reported (trailhead.salesforce.com) checked October 17, 2026