5 Replies Latest reply on Feb 4, 2019 2:51 PM by Nick Parsons

# Reference Lines

Attached workbook is using Tableau Desktop 2018.3.2

I have this workbook titled "Shots Made" on the dashboard "Shooting Performance" where there is a bar chart showing shots made and shots attempted for two players (Frank Ntilikina & Emmanuel Mudiay) from different distances from the hoop. What I would love to do to bring some context into this is to have reference lines showing PG average and NBA average relative to the players shown.

Ex]

I have the value for the PG and NBA average for each court section shown as a calculated value. Is there a way to add this context with reference lines almost as a 'gap' analysis for each player comparing them to PG and NBA average?

Please let me know if this is possible and if so, how I can do this.

Any help is much appreciated!!

• ###### 1. Re: Reference Lines

Hi Caitlyn,

To add a reference line based on a number that you'd like to type in, you can right click on your axis, select add a reference line, change the aggregation to "Constant" and then type in the number where you'd like the reference line to appear.

In this case though it seems like you'd like two different reference lines per player.  In that case, you can create four separate calculations, two for each player that look something like this:

if [Player] = "Emmanuel Mudiay" then number you'd like for your reference line end

Drop all 4 of those calculations onto the detail shelf.  Then you can create reference lines for each of those 4 calculations.  The two reference lines will show up per player and not the other because of the if statement in the calculations.

Best,

Paul

1 of 1 people found this helpful
• ###### 2. Re: Reference Lines

And here's an article on Reference Lines and Bands. Read down the page on the various chart types that will likely accomplish what you described.

1 of 1 people found this helpful
• ###### 3. Re: Reference Lines

Thank you! I ended up just doing the PG average for both players because the NBA and PG average were just too close to be really significant. But it works exactly how I wanted it too.

Thank you!

• ###### 4. Re: Reference Lines

Great!  Happy to help

• ###### 5. Re: Reference Lines

Great viz, nice work!