Skip to content
Tutorials Center
My learning

Topics

Lesson 23 of 35 ยท Advanced Analytics

Stories and Word Clouds in Tableau

Build a Tableau story with story points and captions, make a word cloud from text, and prepare the word counts with pandas so the sizes are right.

Charts do not persuade by themselves. A story in Tableau is a sequence of sheets and dashboards arranged like slides, each with a caption that says what to notice. You use it when the order matters: first the problem, then the cause, then the fix. This lesson also covers the word cloud, a popular but easy-to-abuse way to show text data.

Tableau is graphical, so the story and word cloud steps are instructions for the desktop application. The runnable examples are stand-ins: Python code that prepares the exact numbers a word cloud needs (word counts) and lays out a story's outline as data, so you can plan before you click.

What a story is

A story is a fourth kind of sheet, next to worksheets, dashboards and the file-level items. It contains story points. Each story point holds one worksheet or dashboard plus a caption, and the viewer moves through them with arrows or by clicking the navigator boxes at the top.

Create one from the menu Story > New Story or with the New Story tab at the bottom. Then:

  1. Set the size (Fixed sizes behave best; the story-point sheets resize to fit).
  2. Double-click or drag a sheet from the left pane onto the canvas. This becomes the first story point.
  3. Type a caption in the box above the sheet, such as "Sales dipped in Q3".
  4. Click Add (blank), Duplicate (copy the current state) or Update (save the sheet's current filters into this point) to create the following points.
  5. Add Text or Image objects from the left pane for extra commentary, and use the Layout and Format options for colours and fonts.

The important mechanism is the filter state. Each story point remembers the filters, highlights and selections you had when you saved it. That lets you show one chart three times: all regions, then only the West, then the West with one product highlighted. Use Duplicate to copy the point and then change the filter; use Update to store the change; and Revert if you want to undo changes in the point.

Build a story

New Story Story menu, then New Story.
Add a sheet Drag a sheet or a dashboard.
Caption it One sentence saying what to see.
Add points Blank, Duplicate or Update.
1 / 2

A story outline you can plan in data

Before you open Tableau, write the story as a table: one row per story point, with the caption, the sheet, and the filter. That also exposes weak storytelling: if two captions say the same thing, merge the points.

Python Plan a story as data

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Keep captions short (under 12 words is a good rule). The chart does the proving; the caption only points.

Story vs. dashboard

Dashboard Story
Purpose Explore and monitor Explain and persuade
Navigation Free, by filters Guided, by story points
Time spent Repeated glances One presentation
Best for Daily KPIs Findings, recommendations

A story is made of dashboards and sheets; it is a way of ordering them, not a replacement. Stories are interactive only inside a story point: viewers can still hover, filter if you gave them a filter and so on. When you publish, the navigation and captions travel with the workbook.

Present from Presentation Mode (F7 in Tableau Desktop) for a clean full-screen run-through, and export a PDF or PowerPoint copy as a backup. Stories do not always export neatly, so test it before the meeting.

Word clouds

A word cloud shows words in different sizes, bigger meaning more frequent. They are fun and sometimes useful for a first look at survey comments or reviews. Be aware of their limits: sizes are hard to compare precisely, long words look bigger than short ones, and a cloud says nothing about meaning (the word "problem" with "not" in front of it counts the same).

Tableau has no "word cloud" in Show Me. You build it from a text mark:

  1. Make sure each row of your data is one word (more on that below) with a measure such as Number of Records or Count of reviews.
  2. Change the mark type to Text.
  3. Drag the Word field to Text and to Color (optional), and drag the measure to Size.
  4. Remove the axes and gridlines, and widen the size range with the Size control. You can also drag the measure to Color to emphasise.
  5. Use a Top N filter on Word (for example the top 50 by count) so that the cloud does not become unreadable.

The real work is data preparation. Tableau expects the text already split into words. If your data has a column of whole sentences you need to split it into rows first: with Tableau Prep, with a custom SQL query, or in pandas before you connect. The stand-in below does that: lower-case, remove punctuation, drop stop words ("the", "and", ...), then count.

Python Prepare word counts

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Two measures appear here for a reason. Mentions counts every occurrence; reviews counts how many reviews contain the word at least once. One reviewer who repeats "slow" five times would otherwise dominate the picture. In Tableau terms, that is the difference between COUNT([Word]) and COUNTD([Review ID]).

In SQL (for the custom SQL route), splitting text takes a recursive query; the stand-in below shows a tiny version in SQLite, which many warehouses mimic with a "split to rows" function.

SQL Split text to rows in SQL

Press Run (or Ctrl + Enter) to see the result here.

A word cloud is a poor answer to "which complaint is biggest?" because the sizes do not compare well. Use a sorted bar chart of the top words for any decision, and keep the cloud as decoration or as an opener. If the words come from an uncleaned text field you will also see junk such as "n/a" or "the" at the top. Clean first.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What does each story point store besides the sheet itself?

    A story point remembers filters, selections and highlights, which is how one chart can appear several times with different focus.
  2. 2. You changed a filter inside a story point and want to keep it. Which button saves it?

    Update stores the current state in the story point. Duplicate creates a new point; Revert discards the changes.
  3. 3. To draw a word cloud, which mark type and shelves do you use?

    A word cloud is a text mark with the word on Text and a measure (such as a count) on Size.
  4. 4. Why count distinct reviews as well as mentions?

    Mentions counts every occurrence; distinct reviews shows how widespread a word is.

Summary

  • A story is a sequence of story points; each holds a sheet or dashboard, a caption and a remembered filter state.
  • Use Add, Duplicate and Update to build and modify points; keep captions to one short sentence.
  • A word cloud is a text mark with word on Text and a count on Size, after splitting text into one word per row, lower-casing and removing stop words.
  • Prefer sorted bars for decisions; use clouds sparingly.
  • The pandas and SQL stand-ins prepare exactly the data a Tableau word cloud needs.

Next: Publishing to Tableau Cloud and Server