Tableau Viz: A Scatter Plot with a Twist – The Movement Plot


Tableau Viz: A Scatter Plot with a Twist – The Movement Plot

The Challenge

Visualize movement from Date A to Date B with one dimension and two measures. More specifically, display how these measures interact with each other and affect the outcome or performance of the dimension over time. This problem was posed to me by one of the most awesome clients I’ve been working with lately, and I gladly accepted. 

The Solution

A “Movement Plot.” Think of it as a scatter plot with activity!

How to Create a Movement Plot in Tableau

For this example in Tableau, we will look at the intersection of Profit and Average Discount, and we will plot the movement by sub-category (colored above by Product Category) in the Superstore data set. The business question could be phrased like this: 

“How has discount affected profit by sub-category over a given time? Is there a direct correlation between profit and the amount of discount given? Can we track the progress or lack thereof?”

Step 1: Create Your Calculations

First, create a date parameter (this will be your end date or the date you want to see movement to). Next, create a calculated field to be used as a filter that only brings in the date selected in the parameter (end date) and the start date. I am using a static three-month look-back to define the start date. You could make that number dynamic by using a second parameter.

Create a Calculated Field

Note: I have also rolled the data up to the month level. Days would be an easier calculation like this:

Calculate Days

Now, create a Boolean (T/F) calculation that will be used to size the line. I do this to make the end date larger and the start date smaller. This will help us visualize direction. 

Boolean calculation

Step 2: Let’s Build It!

Format Marks card

  1. Move Measure A to Columns and Measure B to Rows.
  2. Marks Type = Line.
  3. Dimension to Color (or Detail if you don’t want separate colors). Format Color on the Marks card. Transparency will make it easier to see other members, and the second Markers option will accent the start and end dates.
  4. Move your Date Filter Calculation to the Filter shelf and select 1.
  5. Move Date Size Calculation to Size on the Marks card. This must be below Color or Detail.

Step 3: Use It!

Here’s what you can use a movement plot for:

  1. The need to display the relationship of two measures and their impact on a dimension over time.
  2. Looking at a certain group or set within the dimension. Perhaps we have altered a few members of the dimension and want to see the impact of this test. Or, maybe we want to track our top five in sales. Visualized below:

Top 5 in Sales Movement Plot

Improvements or comments are welcomed. Viz On!

More About the Author

Paul Mathewson

Analytics Consultant
Open Data Viz: San Francisco Evictions Evictions are a sensitive subject in San Francisco. Long-term residents are being pushed out of their homes due to rising rent – some ...
Open Data Viz: San Francisco Restaurant Scores The City of San Francisco’s Health Department is always busy making sure our local restaurants are meeting food safety standards. ...

See more from this author →

Subscribe to our newsletter

  • I understand that InterWorks will use the data provided for the purpose of communication and the administration my request. InterWorks will never disclose or sell any personal data except where required to do so by law. Finally, I understand that future communications related topics and events may be sent from InterWorks, but I can opt-out at any time.
  • This field is for validation purposes and should be left unchanged.

InterWorks uses cookies to allow us to better understand how the site is used. By continuing to use this site, you consent to this policy. Review Policy OK