Calculations Inside Formulas

The following code sample contains a calculation within a formula. In this case, we are taking the average of values of the tag Simulation00001 over the previous hour. Typically, use a polled trigger to schedule the execution of the formula.
Result=Calculation("Simulation00001","Average","Now-1hour","Now",Quality)