How To: Shaded Slope Charts in Tableau

2/12/2017 Matt Chambers 8 Comments





I recently found an article showcasing 2016 in charts, and I really liked the slope charts with the area shaded between the two categories being compared.


I found this to be a really cool technique for making a point and telling the story.  I wanted to see if I could recreate this in Tableau, so here's how it's done.  I'm using the Superstore data in this example.

1.  Create a standard slope chart by setting the Year to discrete, filtering to two discrete years, adding the measure to the Rows and Category to the detail.


2. In this case, I want to show the difference in Profit between Technology and Furniture.  To create the shaded area, I need to isolate their respective profits.




3. Drag the newly-created Furniture Profit measure to the Rows, and then drag the Technology Profit pill to the left to create the Measure Values pill.



4. Create a dual axis and synchronize the axes, change the Measure Values to Area, and remove Category from the detail.



5. Move the Technology Profit measure to the top of the Measure Values list and change the Furniture Profit color to white.  I also went ahead and changed the Technology Profit color to blue.


6. Since we are using an area chart, the Technology Profit is being stacked on top of the Furniture Profit, which is pushing the shaded area up above the slope chart even when synchronized.  To fix this, we need to subtract the Furniture Profit from the Technology Profit.  I went ahead and edited the calculation in the shelf: SUM([Technology Profit]])-SUM([Furniture Profit]])


7. To color the dimensions I wanted to compare, I created a calculation to only color those dimensions.  Drag this dimension to the color and turn on the dotted line.




8. Hide headers and clean up the chart formatting. I also thickened the lines and set the area chart color to blue with 20% transparency in my example.


9. Finally, incorporate storytelling elements like using color to point out the categories being compared and annotations to highlight the gap.



Feel free to download the workbook and comment with any questions.

8 comments:

  1. This is something worth sharing. I am amazed to see how well you organized this post. your blog style is also very impressive and beautiful. I am very impressed. Great work!

    ReplyDelete
  2. Your blog content is exactly what I need, I like your blog, I sincerely hope that your blog is a fast-growing traffic density, and to help promote your blog, we hope you blog updates and place can always be colorful.used office cubicles for sale

    ReplyDelete
  3. I am truly inspired with this blog on How To: Shaded Slope Charts in Tableau. A debt of gratitude is in order for sharing this post.

    ReplyDelete
  4. I have no words to appreciate this post ..... I'm really impressed with this post .... office cubicles for sale

    ReplyDelete
  5. hello everyone.....
    thank the good topic.
    Welcome To Casino online Please Click the website
    thank you.
    gclub casino
    gclub จีคลับ
    gclub

    ReplyDelete
  6. I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in Tableau.kindly contact us http://www.maxmunus.com/contact
    MaxMunus Offer World Class Virtual Instructor led training on Tableau. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.

    For Free Demo Contact us:
    Name : Arunkumar U
    Email : arun@maxmunus.com
    Skype id: training_maxmunus
    Contact No.-+91-9738507310
    Company Website –http://www.maxmunus.com


    ReplyDelete
  7. thank for information ,
    a nice post .

    gclub online
    goldenslot

    ReplyDelete