Video | Tableau | Data prep | Analytics

Tableau Prep Tiles: New in Tableau 2021.4

Tableau Prep finally gets tiling in 2021.4, but watch out, the nTile function groups by your partitioned field, not by row count.

Part ofWhat's new in Tableau 2021.4Tableau Prep Builder tutorial Jan-2020
Watch on YouTube
  • Tiling in Tableau Prep isn't a new object but a function used inside a calculation, found under the analytical functions as nTile
  • nTile must be combined with partition (defines the grouping) and order by (sets the rank and ASC/DESC direction) to work
  • The number you pass to nTile decides how many equal groups are created, each labelled with a sequential number
  • Groups are equal by the partitioned field (e.g. customer name), not by row count, so the level of granularity strongly affects how rows distribute
  • You can use rank instead of order by, but the syntax differs and these analytical functions are easy to get wrong, so test your assumptions carefully

Tableau Prep 2021.4 adds tiling via the nTile function, letting you split data into equal groups — but the groups are equal by whatever field you partition on, not by row count, which can trip you up if you're not careful about data grain.

Tim works in an existing Tableau Prep flow with customer and sales data. He adds a calculation step to group customers into tiles based on their sales.

The Breakdown
  1. Tiling is a function, not a new object 0:00

    Tiling isn't a new step type in the Prep canvas — it's the nTile function used inside a calculation, found under the analytical functions.

  2. Add a clean step for the calculation 0:33

    You need to add a calculation step (Tim uses a clean step) to write the nTile function; he places it before an existing parameter step to preserve full data context.

  3. nTile relies on partition and order by 1:00

    nTile must be nested inside a partition/order by structure: partition defines your grouping field, order by sets the rank field and direction (ASC/DESC), and nTile then splits that ordered list into however many equal groups you specify.

  4. Build the calculation step by step 2:31

    Type partition and let autocomplete structure it, set the partition field (e.g. customer name), add a colon, then order by a value field (e.g. sales) with DESC or ASC, then wrap it with nTile and a number (e.g. 5) to define how many groups to create.

  5. Groups are equal by the partitioned field, not by row 4:17

    nTile groups by the distinct values in your partition field — so if you partition by customer name, it creates equal groups of customers, not equal numbers of rows; because bigger customers often have more transaction rows, the resulting row counts per tile can differ noticeably even though the customer groups are even.

  6. Check granularity before trusting the split 6:01

    Before relying on tile output, understand the grain of your data: aggregating up (e.g. one row per customer) gives a different picture than looking at raw transaction-level rows, so always verify results match what you actually expect the groups to represent.

  7. Inspect groups with an aggregate step 6:45

    Add an aggregate step and bring in the grouping field alongside a measure to see the actual distribution across your tiles — a good way to sanity-check that the groups behave as intended.

  8. Rank is an alternative, but syntax differs 8:47

    You could use rank instead of order by as another way to sequence your data, but the syntax isn't interchangeable — Tim demonstrates getting caught out trying to swap one for the other, so test your calculation carefully rather than assuming these functions behave consistently.

Worth Knowing
  • Equal tiles apply to the partitioned field, not row count — expect uneven row totals per group if some partition values have more underlying rows than others
  • Partition and order by had bugs in earlier Tableau versions that meant they didn't work as documented
  • Rank and order by aren't drop-in replacements for each other inside nTile — mixing them up can silently break or confuse your calculation
Use It When

Reach for this when you need to bucket customers, products or any entity into equal-sized groups (like quintiles) inside a Prep flow, rather than building that logic downstream in Desktop.

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.