Tableau Deep Dive: Parameters – Reference Lines


Tableau Deep Dive: Parameters – Reference Lines

Tableau Deep Dives are a loose collection of mini-series designed to give you an in-depth look into various features of Tableau Software.

In the next article of our Deep Dive on Parameters, we will examine reference lines. Remember, there are a lot of ways to add reference lines to your view: the Analysis drop-down menu, the Analytics pane or right-clicking on the measures axis. Also, reference line is a broad term. Don’t be confused by the breakout of different options in the Analytics menu besides the Reference Line option, such as Reference Bands, Distribution Bands, etc. You can use parameters in nearly all of them.

Use Case #1: Reference Line

Our first use case starts with a vertical bar chart for profit margin. Remember, profit margin is:

Profit Margin calculation

Here’s our initial view:

Bar chart in Tableau

I’ve got different profit margin goals that I want to compare to my actual performance. I want to take those goals and use them to create a parameterized reference line. We’ll start by adding a reference line. However, if you end up adding it from the various ways available, you’ll end up with the Edit Reference Line, Band or Box window.

Go to your Line Value drop-down and select Create New Parameter:

Create New Parameter

Here’s my parameter:

Profit Margin Goals parameter

This is how my view appears now:

Adjusted Tableau view w/ new Profit Margin Goals parameter

Just to make it a little more useful, I’m going to add some conditional formatting to color my marks that fall below the reference line in red. When the report user changes the parameter, the color of my marks will also change. To do this, we’ll create a simple calculation to create a True or False for our formatting:

Meet Profit Goal?

Profit Margin is our measure and Profit Margin Goals is our parameter. I’ll drag our newly created calculated field onto the Color shelf on the Marks card and adjust the colors appropriately to get the following:

Tableau viz with new calculated field

A quick aside on the color scheme for the above view: By making my True grey and my False red, this view is really a warning on poor performers. I’m drawing attention to the fact that Binders and Paper are not performing up to our profit margin goal. Perhaps our profit margin goal is a minimum threshold? By switching the color scheme to True blue and False grey, it takes a tone of highlighting successes:

Highlighting successes with color in Tableau

See the difference? This is not specifically related to parameters, but it’s a good opportunity to illustrate how even the color of your marks can lead the report user into the story you’re trying to tell whether it’s trumpeting business successes (blue) or raising concern about failures (red).

Bullet Graph

We’ll take what we just learned and add it to a bullet graph, which is the Tableau community’s answer to gauges. I’m going to create a profit goal based on a percentage of sales. That percentage is going based on Profit Margin Goals parameter. Here is my new calculated field for my Profit Goals:

New calculated field for Profit Goals

I’m ready now to create my view. I’ll start by adding Profit to Columns with Category on Rows:

Adding Profit and Category to the viz

Now it’s time to use our Analytics pane to add reference lines and distribution bands. Add our calculated field, Profit Goal, to the Detail button. Let’s start with our reference line as so:

Edit Reference Line, Band or Box

And now our distribution bands:

Distribution bands

Our view now looks like this:

Final Tableau view w/ reference lines

The distribution bands are showing shaded areas of grey around each bar to show progress. In this case the grey areas represent milestones of 50%, 75% and 100% progress towards our profit goal. The reference line provides the finish line with a thick black line, clearly indicating which categories have surpassed our profit goals.


What’s Next?

What other ideas do you have in parameterizing your reference lines? What could you do with a bullet graph?

In the next article, we’ll examine how parameters can be used in table calculations. If you have any comments or questions, leave them in the area provided below. Thanks!

Want More Tableau Deep Dives

  1. Tableau Deep Dive: LOD – Introduction to Detail
  2. Tableau Deep Dive: LOD – The Include Calculation
  3. Tableau Deep Dive: LOD – The Exclude Calculation
  4. Tableau Deep Dive: LOD – The Fixed Calculation
  5. Tableau Deep Dive: LOD – LOD Calculations vs. Table Calculations
  6. Tableau Deep Dive: Parameters – Parameter Overview
  7. Tableau Deep Dive: Parameters – Parameter Properties
  8. Tableau Deep Dive: Parameters – Filtering – Top N
  9. Tableau Deep Dive: Parameters – Calculated Fields
  10. Tableau Deep Dive: Parameters – Filtering Across Data Sources
  11. Tableau Deep Dive: Parameters – Bins
  12. Tableau Deep Dive: Parameters – Reference Lines
  13. Tableau Deep Dive: Parameters – Table Calculations
  14. Tableau Deep Dive: Sets – Introduction to Sets
  15. Tableau Deep Dive: Sets – Constant Sets
  16. Tableau Deep Dive: Sets – Computed Sets
  17. Tableau Deep Dive: Sets – IN/OUT
  18. Tableau Deep Dive: Sets – Combined Sets
  19. Tableau Deep Dive: Sets – Calculated Fields
  20. Tableau Deep Dive: Sets – Hierarchies
  21. Tableau Deep Dive: Dates – Introduction to Dates
  22. Tableau Deep Dive: Dates – Preparing Dates
  23. Tableau Deep Dive: Dates – More Date Functions
  24. Tableau Deep Dive: Dates – Exact Dates
  25. Tableau Deep Dive: Dates – Custom Dates
  26. Tableau Deep Dive: Dates – Rolling Dates
  27. Tableau Deep Dive: Dates – Calendar Filters
  28. Tableau Deep Dive: Dates – Week-by-Week Comparison
  29. Tableau Deep Dive: Dashboard Design – Planning
  30. Tableau Deep Dive: Dashboard Design – Layout & Structure
  31. Tableau Deep Dive: Dashboard Design – Proof of Concept
  32. Tableau Deep Dive: Dashboard Design – Adding Interactivity
  33. Tableau Deep Dive: Dashboard Design – Visual Best Practices
  34. Tableau Deep Dive: Dashboard Design – Optimization & Governance
  35. Tableau Deep Dive: Dashboard Design – Publishing
  36. Tableau Deep Dive: Table Calculations – Custom Sorts, Part One
  37. Tableau Deep Dive: Table Calculations – Custom Sorts, Part Two
  38. Tableau Deep Dive: Table Calculations – Custom Sorts, Part Three

More About the Author

Robert Curtis

Managing Director, APAC
Surveys Reveal the 5 Biggest Pain Points for Data & Analytics Leaders InterWorks has been a global, full-stack consulting firm for many years now. A big part of our job as consultants is to first listen to ...
Kickstarting Data Innovation in Healthcare On 13 March 2024, InterWorks was a proud Platinum sponsor of the first ever Data & Analytics in Healthcare conference, hosted by ...

See more from this author →

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


Interworks GmbH
Ratinger Straße 9
40213 Düsseldorf
Geschäftsführer: Mel Stephenson

Telefon: +49 (0)211 5408 5301

Amtsgericht Düsseldorf HRB 79752
UstldNr: DE 313 353 072


Love our blog? You should see our emails. Sign up for our newsletter!