top of page
Writer's pictureBernard Kilonzo

Adding Trend Indicators in Tableau – up & down arrows to show the trend of data.


Adding trendline indicators in tableau

Sometime when visualizing the trend of data, you can add indicators (up and down arrows) to show the change of data between point A and B.

trendline with indicators in Tableau

For example, in the above view (showing the trend of data) I have added the indicators to show the percentage change in sales between the year 2018 and 2021. With up arrows indicating positive change while down arrows indicating negative change.

So, how can you add such indicators in your trend data?

Using the Sample-Superstore data, lets create a view showing sales by year of order date for different regions by.

  • Dragging YEAR(Order Date) to the columns

  • Drag SUM(sales) to the rows

  • Add Region to color shelf

line chart

Next, lets compute the percent change in sales relative to the first year (2018) using the following calculations.

tableau calculation

Next, create a calculation that will return the sales for the last year, in this case 2021 - this calculation will act as indicator holder.

Add this calculation to the columns shelf next to the SUM(Sales), and hide any null values.

Make the chart dual axis, and change the marks card of the second view to shape.

To assign the shapes, using the calculation ‘% change in sales’ lets create another calculation ‘KPI’ to differentiate the positive and negative values using the calculation below.

Drag the above calculation to the shape shelf of the second view.

Edit the shapes to assign the appropriate ones.

editing shapes in tableau

Resize the shapes and drag the field ‘% change in sales’ to the label shelf of the second view.

And there we’ve our view. With this view users can see the trend of data as well as see the percentage change between the two extreme points of the data set.

I hope this article was helpful to you. To receive more of the Tableau tips, kindly join our mailing list by subscribing below.

Thank you for reading.

Blog.png
bottom of page