1 of 1 people found this helpful
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:
- Copy your trend line model equation (under Describe Trend Line)
- 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
- 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.)
- 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!
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.