Tableau error Type mismatch
Can’t divide string values by float value
The field on the left of / is text, even if it looks like a number. Division needs numbers on both sides, so convert the text field first.
Which formula raises it, and what fixes it?
[Cost] / [Sales]The xmetric engine rejects it too.
FLOAT([Cost]) / [Sales]On each of the 3 example rows it returns:
| Region | Cost | Sales | Result |
|---|---|---|---|
| East | 8.5 | 20.5 | 0.41 |
| West | 6 | 10.5 | 0.57 |
| West | 2.5 | 5.5 | 0.45 |
Why it works. FLOAT() reads "8.5" as 8.5, so the division runs: 8.5 / 20.5 is about 0.41. Text that is not a number becomes null. If the field is an ID like Order ID, dividing it is probably not what you meant.
The 3 example rows
Region | Cost | Sales |
|---|---|---|
| East | 8.5 | 20.5 |
| West | 6 | 10.5 |
| West | 2.5 | 5.5 |
What else raises this message?
Raises it
[Cost] / 100.0Fixed
FLOAT([Cost]) / 100.0Dividing by a decimal number needs a number on the left too; convert the text column first.
Checked on the xmetric engine: the first fails, the fix runs.
Raises it
[Cost] / ([Sales] * 2)Fixed
FLOAT([Cost]) / ([Sales] * 2)The right side is a decimal number here as well, so only the text side needs FLOAT.
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], [Cost], [Sales]; 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?
Where does a text cost column come from?
Usually a currency symbol or thousands separators in the source, or a decimal comma such as 1.200,00. Clean them with REPLACE before FLOAT, or fix the type at the source.
Should I convert in the formula or in the data source?
In the data source when you can, once for every sheet. Converting in each formula repeats the work and the risk.
Where is this message documented?
- Where the message is reported (rigordatasolutions.com) checked October 17, 2026