Video | Tableau | Data visualisation

The IN operator

The new IN operator finally lets you bin those endless OR statements and even check values against a set.

Watch on YouTube
  • The IN operator lets you replace long OR-based calculations with simpler, more maintainable syntax by checking a value against a bracketed list of expressions
  • You can use a double forward slash to comment out lines within a Tableau calculation
  • Changing a calculation's data type to true/false may require removing and re-adding the field on a shelf to refresh it
  • The IN operator can check a value against a set, not just a list of literals
  • Combining IN with set actions lets dashboard users dynamically build their own selection list, with parameters usable on either side

The IN operator lets you replace long chains of OR conditions with a single, readable check against a list — and it can check against a set too, which opens the door to dashboards where users dynamically build their own filter criteria via set actions.

Built on a simple sales chart broken down by category and subcategory, comparing an old-style nested IF/OR calculation against the new IN operator, using Tableau 2020.3 (a pre-release build with a few noted bugs).

The Breakdown
  1. Write the old OR-based calculation first 1:21

    Tim builds a baseline IF calculation checking a field against multiple values with OR, the way you'd have had to before 2020.3 — useful context for seeing what IN actually saves you.

  2. Comment out code with double slashes 3:01

    As a quick tip, typing // at the start of a line comments it out within a calculation, which is handy for keeping an old version around while you write a replacement.

  3. Re-add the field if the data type changes 4:01

    Switching to IN can change the calculation's output to a true/false boolean, which may show as invalid on a shelf where it's already placed — if that happens, remove the field and drag it back on to refresh it.

  4. Check a value against a set instead of a list 4:47

    IN also accepts a set on the right-hand side, so instead of hardcoding values you can test membership in a set — this only works once you've created the set with the matching values.

  5. Build supporting sheets to drive a dashboard 5:49

    To make the set dynamic, build a visualisation coloured by the set-based calculation and a separate simple list sheet that will act as the selector, then place both on a dashboard.

  6. Wire up a set action from the selector sheet 7:20

    Add a dashboard action that changes the set's values, sourced from your selector sheet on selection, with the option to clear all set values when the selection is cleared — this is the step that makes the dashboard interactive, and choosing the correct source sheet and target set matters here.

  7. Let users build their own selection list 9:41

    Once wired up, users can multi-select items on the selector sheet to dynamically populate the set, and the IN-operator calculation elsewhere updates automatically; Tim notes parameters can also be used on either side of IN for extra flexibility.

Worth Knowing
  • This was demoed on a pre-release build of Tableau 2020.3 and had some bugs at the time of recording
  • Converting a calculation to use IN can change its data type to boolean, breaking existing shelf references until you remove and re-add the field
  • When setting up the set action, you must select the correct target set and the correct source sheet, or the dashboard interactivity won't work as intended
Use It When

Reach for IN whenever you're maintaining a calculation with a long run of OR conditions, or when you want a dashboard where users can dynamically define their own group of values to filter or highlight by, rather than you hardcoding the list.

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.