Hi,
I'm trying to create a script which generates control charts which plots net yields by WO that references a planned yield entry in the %Planned Yield. Since I'd like to create a chart for each product in my data table, and there is a different planned yield for each product, I need to create a reference to the %Planned Yield Column.
I have created a script so that the control chart will generate but the line of code I've created is not creating the reference line. Below is the data table I'm referencing across two products (In total there are 10 products in the data table that the script is generating control charts for).
![ayuan6_0-1589471405178.png ayuan6_0-1589471405178.png](https://community.jmp.com/t5/image/serverpage/image-id/23971i272102DDF4B93356/image-size/medium?v=v2&px=400)
I've scripted the following to generate the control chart by 'product'. The control charts are generating, but it's not creating the reference line for planned yield.
![ayuan6_1-1589471527015.png ayuan6_1-1589471527015.png](https://community.jmp.com/t5/image/serverpage/image-id/23972i634FCA9DB3E96D21/image-size/medium?v=v2&px=400)
This is a snap shot of the output vs. what I was looking to create.
![ayuan6_2-1589471772791.png ayuan6_2-1589471772791.png](https://community.jmp.com/t5/image/serverpage/image-id/23973iB58A1FBFB5A2F045/image-size/medium?v=v2&px=400)
Any advice would be greatly appreciated!