3 Replies Latest reply on Jul 1, 2016 6:09 AM by Vincent Baumel

    Dot at end of Line

    Vincent Baumel

      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
          John Sobczak

          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
            Carl Slifer

            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




            Carl Slifer


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

              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 :-(