I think there are quite a few options. Take a look at the attached workbook and see if either approach is what you are looking for. If so, and you still have questions, I'd be happy to answer!
colored lines.twbx.zip 29.8 KB
Yes! The first one (with the data points highlighted) is exactly what I want to do? Can you tell me how you did it?
1 of 1 people found this helpful
It is a dual axis chart, which means that there are two of the same axes that are shown together (2 X axes or 2 Y axes). You can think of them as creating layers of marks. This is an incredible feature in Tableau and allows for a lot of flexibility in creating combo-chart visualizations. In this case, I combined a line and circles.
Here are the steps I took:
1. Add Date to Columns. Then I right clicked it and switched it to be "Exact Date" and "Continuous". This created a continuous date axis.
2. Add Value to Rows to create one Y axis.
3. Add Value to Rows again, to create the second Y axis.
At this point, you should have two line charts like this:
4. You can overlay the two by creating a dual axis. There are a couple of ways to do it. You can right click the second Value field on the Rows shelf or right click the second "Value" axis in the viz. (I've highlighted both options above). Select "Dual Axis".
5. At this point, you'll have a dual axis and Tableau has tried to be helpful by adding "Measure Names" to the Color and FIlter shelves. You can drag those to fields off. We won't need them for this.
6. You'll want to specify multiple mark types. Right click the second Value field in the Rows and select Mark Type and select Circle.
(For future reference, you can also get multiple mark types using the little drop down arrow on the Marks card).
7. At this point you can drag your Y/N field to the color shelf and you are done!
You can switch which axis you are working with by using the arrow buttons. This what will allow you to customize the marks for the different axis and overlay different types of charts. (e.g. a line chart on top of a bar chart)
By the way, Berrett, I absolutely agree that the first picture is a better chart than the second for this data. The value is either Y or N -- very discrete, so the color should also be discrete and not the gradient seen in the second image.
This is awesome! Thank you so much for your generous help. I really appreciate it. It worked beautifully.