# Learning Lab - Advanced Calculated Data Part 3

Discussion created by Pablo Benvenuto on Oct 17, 2012
Now that you completed Part 2 of this learning lab you are ready to finish the last part.

With the cursor in cell C16, select PI > Advanced Calculated Data.  To fill in the various boxes, use these guidelines to calculate the average length of saleable boards produced:
• With
• PI Tag selected reference to the appropriate cells for the Tagname, Start Time, End Time and Time Interval.
• In the
• Filter Expression field enter a reference to B9.  This will limit the average of saleable boards to those above 5 feet.
• We are performing an average of the value of the events that have been written to the server, so set the
• Calc. Mode to Average.  The conversion factor must, therefore, be equal to 1.
• Set
• Expression Sampling to pt. compressed.  This will assure that only the archived values are averaged.
• Since we are looking for the average of the event values (a.k.a. boards produced), select
• event-weighted in the Calculation Basis box.
• Do not show timestamps, they are identical to those produced in Column
• A.
• Press the
• OK button to see the results.

With the cursor in cell D16, select PI > Advanced Calculated Data.  To fill in the various boxes, use these guidelines to calculate the total value of scrap produced: • With
• PI Expression selected reference to the appropriate cells for the Expression, Start Time, End Time and Time Interval.  The Expression is the cost of a foot of scrap multiplied by the measurement for each board.
• In the
• Filter Expression field, enter a reference to B10.  We want the value of all boards less than 5 feet to calculate the scrap value.
• We are performing a
• Total of the value of the expression every time a board less than 5 feet is produced, so set the Calc. Mode to Total.  The conversion factor is equal to 1 since these are not “per time” measurements.
• Set Expression Sampling to Compressed.  This will assure that the expression is only evaluated when a board has actually been produced.
• Since we are looking for the total based upon event values (i.e. boards produced), select
• event-weighted in the Calculation Basis box.
• Do not show timestamps, they are identical to those produced in Column
• A.
• Press the
• OK button to see the results.

The final spreadsheet should look like the figure presented in Part 1.