Control charts are an essential tool used in quality control processes to monitor and track the variation in data. They help identify when a process is in control or out of control. Tableau is a powerful data visualization tool that can be used to create various types of charts, including control charts. This blog will guide you through creating a control chart in Tableau.
Step 1: Import your data into Tableau
The first step is to import your data into Tableau. Make sure your data is in a suitable format. I am using sample-supermarket Microsoft Excel. Once your data is imported, you can start creating your control chart.
Step 2 :Create a time series chart
To create a control chart, you need to create a time series chart in Tableau. A time series chart is a graph that shows how data changes over time. To create a time series chart, follow these steps:
Drag your time variable to the Columns shelf, I have put order date in Colum .
Drag your variable of interest to the Rows shelf, I have put profit in row.
Change the mark type to your choice, I put line.
Step 3: Add control limits
The next step is to add control limits to your chart. Control limits are the boundaries that indicate when a process is out of control. There are two types of control limits: Upper Control Limit (UCL) and Lower Control Limit (LCL). I am creating a control chart where my control limits for Profit are 1000 above Average and 1000 below Average. UCL is "Average+1000" and LCL is "Average-1000"
To add control limits, follow these steps:
1. Create a calculated field.
2. Write formula for average -- WINDOW_AVG(SUM([Profit]))
3. Write formula for LCL and UCL.
Click OK to add the control limits to your chart
Step 4: Add data points
The final step is to add data points to your chart. Data points are individual values that make up your chart. To add control lines for data points, follow these steps:
Drag UCL and LCL and Average to the Detail card.
Change the mark type to Circle.
Add reference line on profit Colum.
4. In Line change Value to Average.
5. In Band Change Minimum Value to LCL and Maximum value to UCL.
Your control chart is now complete. This is the chart after adding labels, legends, and titles. You can also adjust the chart's colors and styles to make it more visually appealing.
Adding Parameter to control chart:
A parameter is a dynamic value that can be used to change the behavior of a visualization. It enables the users to adjust the values in a chart without changing the underlying data. Adding a parameter in a control chart can help in analyzing the data in different ways, making the chart more interactive.
To add a parameter to this chart, follow these steps:
Step 1: Create a parameter
Click on the "Create Parameter" button in the data pane, and a dialog box will appear. Give the parameter a name and select the data type. In this case, we will create a parameter named "Target", which is a floating-point number.
I Put Target as name ,Data type as Float and In Range Minimum is 1 and Maximum is 3 and step size is 1.
Step 2: Add the parameter to the chart
Drag and drop the "Target" parameter from the data pane to the view. It will appear as a slider control on the sheet.
Step 3: Use the Parameter to Control the Chart
The final step is to use the parameter to control the chart. To do this, we will create a calculated field that will change the chart type based on the parameter value.
Edit calculated field LCL and put formula as [Target]*([Average]-1000)
Edit calculated field UCL and put formula as [Target]*([Average]+1000)
Drag both calculated field to detail . Now you will able to control your chart.
In this blog, we have shown you how to create a control chart and how to add parameter in Tableau. A control chart is a powerful tool that can help you monitor and track the variation in your data. By following the steps outlined in this blog, you can create your own control chart and parameters in Tableau and start using it to improve your quality control processes.