Logo Visualitics - Esperti di Data Analysis
Tableau

How to create error bars in Tableau

Error bars help to indicate estimated error or uncertainty to give a general sense of how precise a measurement is.

Let’s now see how to build step-by-step error bars on Tableau. Our goal is to create a chart showing sales margins per month from Sample Superstore data.

Step 1. Create error bars

  1. Connect to the data source Sample – Superstore.
  2. Drag Sales to Rows. Right click on it and select Measure (Sum) > Average.
  3. Drag Order Date to Columns. Right click on it and select Month May.
  4. Select Circle from the dropdown menu in the Marks card. Fit to Entire view.

 

 

  1. Create a Calculated field. Let’s call it Sales margin and type 96*(STDEV([Sales])/SQRT(COUNT([Sales]))).
  2. Create another Calculated field. Let’s call it Upper and type avg([Sales])+[Sales margin].
  3. Create another Calculated field. Let’s call it Lower and type avg([Sales])-[Sales margin].
  4. Drag Sales margin, Upper and Lower on Detail in the Marks card.
  5. Click on the Analytics pane, drag Reference band on Cell as in the picture below. Right

 

 

  1. Fill out the window as below.

 

 

  1. Right click on one of the numbers on the view and select Format > Numbers > Number (custom) > 0 decimal places. Also align horizontal to the center from that same pane.
  2. Adjust the size of the circles from the Marks card.
  3. Drag Sales on Label. Right click on it and select Measure (Sum) > Average.
  4. Right click on it and select Format > Numbers > Number (custom) > 0 decimal places.
  5. Click on Label in the Marks card and select vertical alignment to the centre. Done!

 

 

Don’t wait! Contact us to learn more and continue to follow upcoming news on our website and LinkedIn channel.