Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Example: What is the average of all dimensional scores?

Use variables to hold the total of each dimensional score. Then add all of those scores to get the overall total. Then divide the overall total by the number of test sessions in order to calculate the average. Finally, apply the round(x, p) function to round to two decimal places.

Tip

You must use the semi-colon (;) character to separate each line in the expression.

Tip

When an expression contains multiple lines, the expression that appears on the last line (in this example, the line round(overallAverage, 2)) will be the final result returned.

Code Block
dim1Total = [Total: Dimension 1 Score];
dim2Total = [Total: Dimension 2 Score];
dim3Total = [Total: Dimension 3 Score];
dim4Total = [Total: Dimension 4 Score];
dim5Total = [Total: Dimension 5 Score];

overallTotal = sum(dim1Total, dim2Total, dim3Total, dim4Total, dim5Total);
overallCount = [Count: Session ID];

overallAverage = round(overallTotal / overallCount;

round(overallAverage, 2)

Compare two or more Metrics

...