I've read several posts about changing from a line chart to an area chart, but then I end up with more than 100% of students because it's adding all the lines together.
1 of 1 people found this helpful
Try this to shade between the lines:
Change to an area chart.
This will stack them so you'll get 100%+. Go to Analysis then Stack Marks then Off to turn off stacking.
Now, click on the color card. Change the color of "Low Income" to white and change "High Income" to whatever shading color you want. I'm using a light grey.
Click on the color card again and change the opacity to 100% so we won't see the grey coming through the white.
Now hold Ctrl and drag the AGG(% Met) pill to the right and drop it on the rows shelf again to create a dual axis.
Change the second axis to a line.
Only the top line shows because the other is colored as white. We can't change the color here because it'll change the color on the first axis as well, so duplicate the Student Group field, then drop that on the color card on the second axis.
Now right-click on the second pill on the rows shelf and choose "Dual Axis"
Next, right click on the y axis/header and choose "Synchronize Axis"
You can use the following to add the annotations: Add Annotations - Tableau
Any time. If you would, please be sure to mark my response as the correct answer so we can close this thread. Thanks! And if you need help in the future, you know where to find us!
Thank you again, Ken, for your help. I continue to turn back to these directions to recreate it! Much appreciated. Ken Flerlage
I've put the vizzes into a dashboard which is shaping up nicely. I have the Gaps in a annotation that I've calculated by hand. Is there a way to make the annotation a calculation, and have it automatically calculated if I change from a district level view to a school view, for example?
A second question is, if I wanted to add a third line to the area chart but not have it represented by a color - for example if I wanted to add "limited english" but have it show as just a line and not impact the area coloring, is there a way to do that?
The label could definitely be calculated. The third line might be possible, but not sure. Can you share the current workbook?
Absolutely! I've attached it. I'm trying to show White student performance, Asian student performance, and other students of color. I'd like a "gap" number to display between white students and other students of color. This is an example from somewhere else but it's the idea that I'm trying to accomplish. Basically this is what you helped me with before but with the addition of a single grey line to represent Asian students as well as a calculated Gap %. I can manually type in the gap when it's at our school district level but I do eventually want to do this for each school in which case the gap will be different each time.
Thank you for your thoughts!
We'll want to follow a similar process but, for the area chart, we only want to show White and Students of Color. So let's create alternative measure to use:
% Met White & Students of Color
// Only give us the % for White and Students of Color students
IF ATTR([Student Group])="White" or ATTR([Student Group])="Students of Color" THEN
Now use that for your area chart, then use the regular % Met field for the dual axis line chart.