4 Replies Latest reply on Nov 2, 2018 10:08 AM by Alex Kerin

# Dot at end of Line

I've got a line graph, and I'd like a dot at the end that I can make a different color. Is there a way to get just one data point on an existing line graph? I'm graphing sales over time, and I'd like to dual axis a data point just for the most recent sales figure instead of every x-axis delineation. I can label the end point of my line with my sum(net sales) but can't figure out how to get a single data point there that I could dual axis.

• ###### 1. Re: Dot at end of Line

You should be able to use a table calc on the second axis using a calculated field:    if last() = 0 then sum(sales) end

1 of 1 people found this helpful
• ###### 2. Re: Dot at end of Line

Hi Vincent,

The above poster is exactly correct.

1) Create the Calc Field

IF LAST() = 0 THEN SUM([Sales]) END

2) Drag Sales and the new calculated field to the rows shelf and your date field to the columns shelf

3) Dual Axis the graphs, and sync the axis.

a) Dual axis by Right-clicking the second green field on the rows shelf and select dual axis

b) Sync the axis by Right clicking the secondary axis in the view (right side)

c) I would remove the axis header at this point by right-clicking it once again and unselecting 'Show Header'

4) Choose the second marks card and change the mark type to a circle - may want to increase the size a bit here.

4) You will have nulls, Right click the indicator and choose to hide it. You have nulls in this case because of your table calculation we created above. It only has a condition for the last index in the partition (it computes table across so this would mean the last index is the one on the far right of the single partition that makes up the current table). To gain a better understanding of LAST() as a function check out my colleagues fine post on the matter - https://www.interworks.com/blog/tmccullough/2014/09/29/5-tableau-table-calculation-functions-you-need-know .

5) Profit

Cheers!

Carl Slifer

InterWorks

1 of 1 people found this helpful
• ###### 3. Re: Dot at end of Line

This is exactly what I was looking for. I have a trend line on the line graph, so it defaulted to having one on the new calc as well - Thankfully I was able to remove the trend line from just one! Much appreciated, and thanks for the play-by-play. I work in government though, so I had to skip step 5 :-(

• ###### 4. Re: Dot at end of Line

I have a wonderfully ugly solution to this (as of 2018.3). I had to look for a different situation as I have 5 line charts with 5 different measures, all underneath each other. This makes dual axes out of the question unless you break the charts over separate sheets. Instead I created two custom shapes: a circle mark png and a transparent png. I created a calculation that was true for the last point (in may case, most recent week). I dragged this to shapes and set all the prior points to the transparent png, with the most recent the circle in a color of my choosing.

Float this duplicate over the top on the dashboard, and carefully adjust so that the end points line up - so there you go - a horror show, but it works..