Tableau error Type mismatch
Cannot add string and float values
You used + to join text and a number. In Tableau + adds numbers or joins text, never both at once, so the decimal field has to become text first.
Which formula raises it, and what fixes it?
[Region] + ': ' + [Sales]The xmetric engine rejects it too.
[Region] + ': ' + STR([Sales])On each of the 3 example rows it returns:
| Region | Sales | Result |
|---|---|---|
| East | 20.5 | East: 20.5 |
| West | 10.5 | West: 10.5 |
| West | 5.5 | West: 5.5 |
Why it works. STR() turns 20.5 into "20.5", so every part is text and + joins them. If you meant to add numbers, the text field is the problem: convert it with FLOAT() instead.
The 3 example rows
Region | Sales |
|---|---|
| East | 20.5 |
| West | 10.5 |
| West | 5.5 |
What else raises this message?
Raises it
[Sales] + ' USD'Fixed
STR([Sales]) + ' USD'Text and numbers don't add; convert the number with STR first.
Checked on the xmetric engine: the first fails, the fix runs.
Raises it
[Region] + ROUND([Sales], 0)Fixed
[Region] + ' ' + STR(ROUND([Sales], 0))ROUND still returns a number, so STR comes last.
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], [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?
Why does my label show 1234.5 instead of a formatted amount?
STR doesn't apply number formatting. For a formatted label, put the number on Label and format the field, rather than building the text in the formula.
What if the number is NULL?
STR(NULL) is NULL, and text + NULL is NULL. Wrap it: STR(ZN([Sales])).
Where is this message documented?
- Where the message is reported (thedataschool.co.uk) checked October 17, 2026