Hello everyone!
I am trying to write a script that will calculate moving averages using selected rows in a table.
To set the stage:
I have a data table (example attached) with multiple executions (Unique ID) of a 3 stage process (A, B, C). There is a reported value for each stage and these values are summed to give a Total value for each occasion. I would like to have a column that reports a moving average of the Total. I've looked through some of the discussions and have gotten some good tips for how to do this (i.e., moving averages for each Unique ID...THIS example helped and the formula is in :Moving Average (Unique ID).
The next step I'd like to do is to ONLY include a subset of the runs in this evaluation. The runs are highlighted in red and the desired result (in this case the moving average of only three occasions) is in :Desired Result.
I'm having trouble with the script to select the subset of runs for evalutaion.
Also - I'm relatively new to JSL and would also welcome suggestions on how to get at the end result in a cleaner or more efficient manner.
Thanks in advance for your help!
Chris