2 Replies Latest reply on Apr 18, 2013 4:43 AM by Jason Howard

    Creating P Control Charts

    Jason Howard

      Good afternoon!


      I'm looking to replicate the P control chart I've attached.  I've located other threads that help create control charts in which the upper and lower control limits are a calculated constant (i.e.- http://dataremixed.com/2011/09/tom-brady-and-control-charts-with-tableau/), but, I'm attempting to create upper and lower control limits in which the values move relative to the sample size.  I've been able to create the p-bar measure within my workbook, but, I just can't seem to calculate the lower and upper control limits.


      If someone could help me reproduce the file I've attached in Tableau I'd greatly appreciate it!





        • 1. Re: Creating P Control Charts
          Shawn Wallwork

          Jason if you rt-click the y-axis, click edit axis, and then uncheck the include zero, does that help?

          • 2. Re: Creating P Control Charts
            Jason Howard

            Thanks for the reply!  I greatly appreciate it.  I was actually having difficulty in creating the Upper and Lower control limit calculated fields, but, I've been able to figure it out.  It just took me some time to get the syntax right.  I've included the UCL and LCL calculated field formulas that proved successful for me below in the event that someone might benefit from them in the future.


            UCL = [P_Bar] + 3*(SQRT([P_Bar]*(1-[P_Bar])/SUM([Sample])) )


            LCL = [P_Bar] - 3*(SQRT([P_Bar]*(1-[P_Bar])/SUM([Sample])) )


            These calculated fields also reference the Pbar calculated field, so, I've included that formula for reference as well.


            P_Bar = WINDOW_SUM(( SUM([Sample_Y])) / WINDOW_SUM(SUM([Sample])))