2 Replies Latest reply on Jan 10, 2013 12:14 PM by Bryan Eltzroth

    Highlighting Trend Lines

    Bryan Eltzroth

      I am wondering if there is any way to highlight a trend line on a dashboard when the relvant data line is selected.


      For example, if I select the blue line, I would also like its associated trend line to highlight as well. Right now when I click on any of the data lines, all of the trend lines grey out.


      Thanks in advance.



        • 1. Re: Highlighting Trend Lines
          Catherine Rivier


          Unfortunately I don't believe that's possible as a feature in Tableau as is.  (Of course, if I'm wrong on that, hopefully someone will correct me!)  But, doing some tests, I found if you select the lines using the color legend, rather than the data line itself, it should select both the trend line and the data line.  I wanted to point this out just in case this is an acceptable solution.


          But, there is a way to do exactly what you describe - but keep in mind it won't update when your data does.  Basically, you'll make fake trend lines based on the same model.  Here are the steps:

          1. Copy your trend line model equation (under Describe Trend Line)
          2. Create a calculated field that sets this for each category using a CASE statement.  For example:     CASE [Category] WHEN "Coffee" THEN .0646*[Sales]+1234... ELSE 0 END
          3. Pull this new calculated field as the secondary axis (average, not sum), remove all existing trend lines.  (This should look exactly the same as your original view.)
          4. To set highlighting the way you want, create a new Action - Highlight.  Run action on Select, with Target Highlighting being just the field that currently creates your color.


          Since I'm not sure whether this is what you're looking for, I'm not posting a sample workbook - but let me know if it is and I can do so.

          Hope this helps!



          Message was edited by: Catherine Rivier Just kidding, adding a sample workbook since I already had it!

          1 of 1 people found this helpful
          • 2. Re: Highlighting Trend Lines
            Bryan Eltzroth



            I will go ahead and use the calculation in a couple of my other visualizations. The one I posted is going to be updated on a daily basis. This dashboard will suffice while being highlighted from the color shelf.


            Thank you very much for the help!




            EDIT: I went into the dashboard and under the filter shelf I checked the Highlight Selected Items option. It appears to work on both the dashboard and in the worksheets. It allows me to click on the data line and highlight the trend line as well. It is a workaround but it seems to work well on a global basis.