Video | Tableau | Data prep | Data visualisation

Tableau Type Conversion with STR, INT and FLOAT functions.

STR, INT and FLOAT: the three Tableau functions that change one data type into another, with the precision gotchas you need to know.

Part ofTableau Functions
Watch on YouTube
  • STR converts integers or floats into text, but it pulls back full precision from the underlying data so you may need to round or clean decimals before converting
  • INT strips the fractional part of a float and returns a whole number, useful when a data set needs integers rather than decimals
  • FLOAT changes a number's data type to decimal even when it looks identical to an integer in the view, which you can verify via the field's change data type menu
  • Formatting is separate from the underlying data structure, so forcing decimal places via number formatting does not actually change an integer into a float
  • Type conversion functions matter most when comparing values inside calculations, where you need to match like data types

Tableau's STR, INT and FLOAT functions convert an expression from one data type to another, and knowing exactly what each one does to precision and formatting matters when you need to compare or combine fields of different types in a calculation.

Tim works with a simple data set of names, ages, years and heights (in inches) to deliberately create scenarios showing what each conversion function does and doesn't do.

The Breakdown
  • Dimensions vs measures aren't always what they seem 0:57

    Tableau can infer that a field like a year is really a whole number even though it sits with the dimensions, while other numeric fields default to measures - worth checking before you assume a field's type from where it sits in the pane.

  • STR turns numbers into text 2:25

    Wrapping an integer or float field in STR converts it to a string, which then behaves like a discrete dimension rather than an aggregatable measure. Applied to a float, STR pulls back the full underlying precision of the number, not just the decimal places shown in the view, so you may need to round or clean the value first if you want a usable result.

  • INT strips floats down to whole numbers 5:12

    INT removes the fractional part of a float and returns just the whole number - handy whenever your data or downstream logic needs integers rather than decimals, such as ages, which people naturally think of as whole numbers rather than fractions.

  • FLOAT can change type invisibly 7:03

    Applying FLOAT to a field that has no decimal precision (like a whole-number age) still changes its underlying data type to decimal, even though it displays identically to the original integer in the view. You can only confirm this by right-clicking the field and checking 'change data type' - one shows 'number (whole)', the other 'number (decimal)'.

  • Formatting doesn't change the underlying data type 8:21

    You can force an integer to display with decimal places via custom number formatting, but this is purely cosmetic - the field is still a whole number underneath. Don't mistake how a value is displayed for what it actually is; this distinction catches people out especially with currency formatting.

  • Why this matters in calculations 9:20

    These conversions are most useful when a calculation needs to compare or combine values of matching data types - integers with integers, floats with floats - and the source fields don't naturally line up.

Worth Knowing
  • Converting a float to a string brings back full underlying precision from the data set, not just the rounded decimals shown in the view - clean or round first if you don't want a messy result
  • Two fields can look pixel-identical in a table while one is an integer and the other a float - the only reliable check is the field's 'change data type' setting
  • Forcing decimal formatting onto an integer doesn't convert it to a float - formatting and data type are entirely separate
Use It When

Reach for these when a calculation is comparing or combining fields that aren't the same data type, or when you need to deliberately reshape a field - like stripping decimals for a whole-number metric or turning a number into text for display.

How this Rollup was made provenance & method

A Rollup is drafted by AI from the video's transcript, then reviewed and edited by Tim. Everything used to produce this one is listed below — the model, the exact prompt, and the source video — so the process is transparent and reproducible.

Transcription
On-device — NVIDIA Parakeet v3 for recent videos, OpenAI Whisper large-v3 for earlier ones. The transcript never leaves the machine or gets published.
Drafting
Claude Sonnet 5 in the cloud, from that transcript.
Prompt
The exact Rollup prompt (v2) — the full system prompt, unedited.
Source video
Watch on YouTube
Drafted
5 July 2026 at 09:38
Reviewed & edited
5 July 2026 at 09:41 · by Tim Ngwena

Model + prompt + video is everything you'd need to recreate a Rollup like this yourself. The one thing we don't share is the transcript.

Rights. The video and its transcript are the property of TN Media Ltd. Unauthorised use or download is prohibited. © TN Media Ltd.