The Calculation, Sum, Max, Min and Average calculation fields and the History Calculation field
Equations in the Form Builder calculation fields are based on an excel model, but are slightly different:
Instead of typing in the cell name into the calculation, you actually type in the field name (with the exact case and spacings) and that is used in the calculation.
1. Remember that the equations are not cell based, they use real names.
2. There are a limited set of functions available.
3. Equations in the Form Builder do not start with = like in excel.
In excel, you use the cell reference to perform calculations e.g.:
=A1 + B1 + C1
In the Form Builder, all data is referenced by it's unique name (and there is no "="). The Form Builder equivalent would be written:
Height + Weight + Length
sum(Height, Weight, Length)
OPERATORS (+ - * /)
The standard numerical operators are allowed in equations, and follow normal mathematical precedence:
+, e.g. 5 + 6 which would return 11
-, e.g. 5 - 6 which would return -1
/, e.g. 5 / 6 which would return 0.833
*, e.g. 5 * 6 which would return 30
Brackets can be used at your discretion to break up your equation like in excel.
You can add in calculations into your form to calculate out anything from sum of skinfolds to max and minimum times for a series of runs.
What Calculations are available?
The builder was built to cover most of your calculation requirements. We have created a Calculation tool, and then some rapid Average and Sum capabilities, as well as algorithmic equations which allow you to track variation in performance and peaking and over training risk.
The Calculations available are:
-Calculations: are where you can create free form equations.
-Option Calculation: allows you to return a non numeric answer (e.g allows you to have a calculation that returned a "pass or fail" for a fatigue index calculation).
-Average: allows you to calculate the average of specific fields within your form by rapidly selecting variables.
-Sum: allows you calculate the sum of specific fields within your form by rapidly selecting variables.
-Variation Score: allows you to calculate how varied the athlete is.
-Peak Performance Risk: Uses all of the fields in a form, learns the profile of each athlete and then calculates how different they are from normal in a positive direction.
Overtraining Risk: Uses all of the fields in the form, learns the profile of each athlete and then calculates how different they are from normal in a negative direction.
Date Difference Calculation: Calculates out differences between dates
Age Calculation: Calculate the athlete's age based on the date of birth from their Account settings
To add a calculation to the form, click on the type of calculation that you require and it will appear as a field in your event form over on the left. Name it and set up and visibility settings
You will be shown a blank text calculation area where you can start to add in your calculations. You can click on the Available Functions to see the list of functions that you can use in your calculation area
Some of the available functions on the Application Builder
Calculate the minimum value
min(Sprint 1, Sprint 2, Sprint 3)
min(1.2, Sprint 1)
Calculate the maximum value
max(Sprint 1, Sprint 2, Sprint 3)
max(1.2, Sprint 1)
Calculate the sum of all values
sum(Sprint 1, Sprint 2, Sprint 3)
sum(1.2, Sprint 1)
Calculate the mean of all values
mean(Sprint 1, Sprint 2, Sprint 3)
Calculate the variance of all values
var(Sprint 1, Sprint 2, Sprint 3)
var(1.2, Sprint 1)
Calculate the standard deviation of all the values
stddev(Sprint 1, Sprint 2, Sprint 3)
stddev(1.2, Sprint 1)
Return the closest whole number
trunc(5.3) = 5
trunc(5.6) = 6
Given two numbers, a and b, calculate the remainder when dividing a with b.
mod(9,1) = 0
mod(9,2) = 1
mod(9,3) = 0
mod(9,4) = 1
mod(9,5) = 4
Raises the first value to the power of the second value.
pow(2,5) = 2^5 = 32
pow(5,2) = 5^2 = 25
If takes a true/false value (non-zero or zero), and one or two other values. If the condition is true (non-zero), the first value is returned, else the second value is (or zero if it doesn't exist).
Examples for "Calculation" types:
if( 5 < 6, 100, 10) = 100
if( 5 > 6, 100, 10) = 10
Examples for "Option Calculation" types:
if( mean(Sprint 1, Sprint 2, Sprint 3) < min(Sprint 1, Sprint 2, Sprint 3) / 0.95, 'Pass', 'Fail')
Ifnumber tests to see if a field contains a valid number. If it does not (e.g. it's not entered or entered incorrectly) you can return another value.
This adds two numbers, regardless of whether they are both entered or not.
ifnumber(Sprint1, Sprint1, 0) + ifnumber(Sprint2, Sprint2, 0)
Type the field name directly into the text area to use in the equation, or select the "Add Question" Drop down and then select the field name and click the green +
Any errors with the equation will automatically appear for you to correct (as shown here)
One important difference between using the Max, Min, Average and Sum fields and writing the equation as a max(field 1, field 2, field 3 etc) is that the max, min, average and sum will calculate with just one field. With a calculation, it won't calculate until all of the fields are entered.
The image shows that Sum of 4 quick calculation has been set up using the Sum field and the fields bicep, tricep, subcapular and illiac crest fields were then ticked. A different sum calculation was added using the Calculation field and was written sum (bicep +tricep + subcapular + illiac crest).
The "Sum" field calculates when there are 1,2,3 or 4 fields entered. However, the calculation field (Sum of 4 Skinfolds) only calculates when all of the four fields in the written equation are entered. Be aware of your needs depending on which field you select. You may need to add in a calculation so that if a skinfolds is missing the equation does not calculate and give you false data.
The Sum, Average, Maximum and Minimum Calculation Fields are designed as a quick way to set up an equation without need to type the equation. You just select your variables
To add in one of these fields, click on the field, name it add in a description and the set up any Advanced properties field (such as show in table, format, or higher and lower etc)
Always check that the correct fields are selected and that the equation calculates on the form preview
The History Calculation Field allows you to create calculations based on the history of a specific field in your form. This is important for equations like player workload, or player daily workload information
Each field will appear in the "Add Question" selection box along with a historical field that you can use to calculate any type of historical data for the fields in the form.
With a Historical calculation you now have access to an additional set of fields for that form called historical. In the image here you can see that you have the fields that were built into the form, AND you also have historical values for each of these fields now to perform calculations on. The example here is being set to show the minimum weight over all weights entered for the athlete over the past year. A Maximum is also being added to the form. A maximum one is also being set for the last year.