Search code examples
macrosminitab

Minitab Control Charts - Show only a subset of the data while computing control limits using all available data


I have over 100 control charts that are created using a few Minitab macros. These charts are for monitoring a manufacturing process. For this year's campaign report I would like to visually show only this year's data on the chart however I would like Minitab to compute the control limits using all available data (current and historical).

I have made a few requirements for which runs to include in the computation using "INCLUDE; WHERE". Is there a command I can include in the macro that allows me to only show data for Batches X through Y, or show data points beginning with Batch X? As a last resort I would consider a command that allows a set number of batches to be displayed (last 30 or last 40, etc).

Thanks!


Solution

  • I ran a basic test on some random data. I created a random set of 150 data points, and ran an IMR chart for it, so I would have a point of comparison. Then I tried adding the command Display to the code for it to only display the final 50 points of the data. This is how my macro code looked.

    IMRChart Test;
      Scale 1;
        PSize 11;
      Scale 2;
        PSize 11;
      Display 50;
      Connect;
      Symbol;
      Title;
      Footnote;
        FPer.
    

    The calculated means and limits were still the same as the previous chart which displayed the entire data set.

    This test was done in Minitab 17.2.1. There have been some language changes since some of the other versions, I hope this is helpful to you. If this does not work, I recommend going to the Help Menu>Session Commands>IChart. This lists other commands and manners of controlling the display, such as DISPLAY, SPLIT, NSESSION, INLABELS, and OUTLABELS.