I use one measurement process to assess the capability of two different products on our production line. For various reasons, the spec limits for the two products are different but the measurement data is combined with one field being used to indicate which product is being processed.
I am trying to generate a simple, tabular process capability report that splits the data into two separate reports based on the product type in such a way that I can apply different specs to the two groups. I have called them Product A and Product B in this example. My thought was to change the script to look like the example below but the resulting Capability report uses the second set of Spec Limits for both product groups. The data come from the same source and I need to track them together so I don't really want to double-up the process with filters on the data source. Any Ideas please?

Process Capability(
SendToByGroup( Bygroup Default ),
Process Variables( :D1953_NpMin, :D1953_NpMax, :D1953_NpParallelism, :D1953_Act1LhsActualX, :D1953_Act1LhsActualY, :D1953_Act1Par ),
SendToByGroup(
{:prd_ERPItemNo == "PRODUCT A"},
Spec Limits(
:D1953_NpMin( LSL( 19.875 ), Target( 20 ), USL( 20.125 ) ), :D1953_NpMax( LSL( 19.875 ), Target( 20 ), USL( 20.125 ) ),
:D1953_NpParallelism( LSL( 0 ), Target( 0.09 ), USL( 0.16 ) ), :D1953_Act1LhsActualX( LSL( 29.743 ), Target( 29.763 ), USL( 29.783 ) ),
:D1953_Act1LhsActualY( LSL( -13.53 ), Target( -13.49 ), USL( -13.45 ) ), :D1953_Act1Par( LSL( -0.016 ), Target( -.006 ), USL( 0.004 ) )
),
{:prd_ERPItemNo == "PRODUCT B"},
Spec Limits(
:D1953_NpMin( LSL( 19.875 ), Target( 20 ), USL( 20.125 ) ), :D1953_NpMax( LSL( 19.875 ), Target( 20 ), USL( 20.125 ) ),
:D1953_NpParallelism( LSL( 0 ), Target( 0.09 ), USL( 0.16 ) ), :D1953_Act1LhsActualX( LSL( 29.743 ), Target( 29.763 ), USL( 29.783 ) ),
:D1953_Act1LhsActualY( LSL( -13.53 ), Target( -13.49 ), USL( -13.45 ) ), :D1953_Act1Par( LSL( -0.008 ), Target( .002 ), USL( 0.012 ) )
)
),
Moving Range Method( Average of Moving Ranges ),
Capability Box Plots( 0 ),
Overall Sigma Summary Report( 1 ),
Goal Plot( 0 ),
Capability Index Plot( 0 ),
Process Performance Plot( 0 ),
By( :prd_ERPItemNo )
);