Type to search

Slope Graphs In Tableau

To Know more about the Different Corporate Training & Consulting Visit our website www.Instrovate.com Or Email : info@instrovate.com or WhatsApp / Call at +91 74289 52788

Data Analytics Tableau

Slope Graphs In Tableau


During my Corporate Tableau Training in Gurgaon , i get questions many time regarding Slope Graphs in Tableau .

It has been tough earlier to analyze time in live scenarios and Tableau has helped us solve this issue through a great extend with the help of various visualizations like — Line graphs, Area graphs, Pages shelf — to name a few.

Slope Graph is one such way through which you can see the trend of your Dimensions between a period of time. So, for example if we have to analyse the Sales of various Sub Categories through multiple Months then we made a Line graph like below :

I took Month(Order Date) in Continuous with a Discrete Axis in Columns and Sales in Rows with Sub Category in Color Shelf:

Slope Graphs In Tableau 29

But this visualization looked very clumsy with lots of information on it. Also, this visualization is showing the entire Month of my Data set. So, I even added a Date parameter so that, I could give the clients a Start date and an End Date to choose from. But, rescently a Client asked me to create a viz where they could analyse the growth between the two dates. To be very precise, they didn’t want how the trend of growth has been between the dates (i.e not all the rise and the fall) but, just the movement from the Start and the End Date  (and like always- the dates had to be dynamic). After a lot of internet research I came to know that the answer is Slope Graph in Tableau.

So, let’s move ahead and create a Slope Graph in Tableau which will show you how the movement has been between the Dates that you choose in a Slope. Like always we will be using Sample Superstore.xls for this viz with Orders table to work on.


Step- 1:

Connect Tableau to the Data set and drag Order Table to the preview space and go to the sheet:

Slope Graphs In Tableau 30

Step – 2:

Take Order Date (Month – Continuous) in Columns and Sales in Rows with Sub Category in Color Shelf.

Slope Graphs In Tableau 31


Step – 3:

Hold on to Ctrl in your Keypad and duplicate the Month(Order Date) in the Column Shelf to the Filter Shelf and you will get a dialogue box like below:

Slope Graphs In Tableau 32Slope Graphs In Tableau 33

Choose Range of Date from the above dialogue box to get another dialogue box like below:

Slope Graphs In Tableau 34

Click on Apply and then Show filter.


Step – 4:

Now to highlight only the First and the Last Dates that are chosen through the Filter, we need to create a calculated field like below:

Slope Graphs In Tableau 35

The result of this calculated field will be a table calculation in Boolean which appears in measures. Since we only want the First and the Last values in the visualization we will put this new created calculated field in the Size shelf and from the indicator HIDE the FALSE value:

Slope Graphs In Tableau 36

And now for the Final touch, go to the Month(Order Date) which is in Continuous in the Column Shelf and change it to Discrete. The Slope Graph is ready.

Slope Graphs In Tableau 37