The problem of selecting optimal target values for the mean of the quantity Y of material in a container and the cutoff value on a correlated variable X is considered for a filling process in which a container is nonconforming if its Y value is less than the lower specification limit and inspection is based on X instead of Y. A profit model is constructed which involves selling price and filling, rework, inspection, and penalty costs. Assuming that X and Y are jointly normally distributed, a method of finding the optimal process mean and the cutoff value on X is presented. An example from the cement industry is presented.