List of Functions for Calculated Value Types
Overview:
All algorithms require the expression name of the associated fields in measurements.expression_name format.
Example
Field Name |
|
Field Expression Name |
Attempt 1 |
|
jump_test_attempt_1 |
Attempt 2 |
|
jump_test_attempt_2 |
Attempt 3 |
|
jump_test_attempt_3 |
Math Operators
Addition +
- Example: measurements.jump_test_attempt_1+measurements.jump_test_attempt_2
Subtraction -
- Example: measurements.jump_test_attempt_1-measurements.jump_test_attempt_3
Multiplication *
- Example: measurements.jump_test_attempt_1*measurements.jump_test_attempt_2
Division /
- Example: measurements.jump_test_attempt_2/measurements.jump_test_attempt_3
Modulus %
Power **
Calculated Values
min([VALUE1, VALUE2, ...])
- Minimum value from a list of values
- Example: min([measurements.jump_test_attempt_1, measurements.jump_test_attempt_2, measurements.jump_test_attempt_3])
max([VALUE1, VALUE2, …])
- Maximum value from a list of value
- Example: max([measurements.jump_test_attempt_1, measurements.jump_test_attempt_2, measurements.jump_test_attempt_3])
avg([VALUE1, VALUE2, …])
- Average value from a list of values
- Example: avg([measurements.jump_test_attempt_1, measurements.jump_test_attempt_2, measurements.jump_test_attempt_3])
compact([VALUE1, VALUE2, …])
- Removes zeros from a list of values
abs(VALUE)
- Return the absolute value
- Example: abs([measurements.jump_test_attempt_1 - measurements.jump_test_attempt_3])
sqrt(VALUE)
- Return the squareroot
log(VALUE)
- LOG() similar to Excel
ln(VALUE)
- LN() similar to Excel
round()
- like "ROUND()" in Excel
ceiling()
- like "CEILING()" in Excel. Returns number rounded up, away from zero, to the nearest multiple of significance. See Excel Help for more information.
floor()
- like "FLOOR()" in Excel. Rounds number down, towards zero, to the nearest multiple of significance. See Excel Help for more information.
compactnull()
- remove un-entered values from a list
ifnull(VALUE1, FALLBACK_VALUE2, FALLBACK_VALUE3, …)
- If the first value is not entered, try the second, if that value is not entered, try the third, etc.
Logical Statements
- CONDITION ? PASS_VALUE : FAIL_VALUE
- Comparison Operators (for Conditions)
- VALUE1 == VALUE2 (equal to)
- VALUE1 != VALUE2 (does not equal)
- VALUE1 > VALUE2 (greater than)
- VALUE2 < VALUE2 (less than)
- VALUE1 >= VALUE2 (greater than or equal to)
- VALUE1 <= VALUE2 (less than or equal to)
- VALUE1 matches "/expression/" (contains)
- CONDITION && CONDITION (and)
- CONDITION || CONDITION (or)
Example Logical (TRUE/FALSE) Statements
-
sum(measurements.field1, measurements.field2, measurements.field3, …) > 0 ? 0 : 1
-
measurements.bench_press_1rm_
reps > 1 ? ((measurements.bench_press_ 1rm_weight*measurements.bench_ press_1rm_reps*0.033) + measurements.bench_press_1rm_ weight) : measurements.bench_press_1rm_ weight
-
(measurements.field1 > 1 ? 1 : 0) + (measurments.field2 > 1 ? 1 : 0) + (measurements.field3 > 1 ? 1 : 0) + (measurements.field4 > 1 ? 1 : 0)
- ifnull(measurements.rpe_
session_1_srpe, measurements.rpe_session_2_ srpe, measurements.rpe_session_3_ srpe, measurements.rpe_session_4_ srpe, null) === null ? null : ifnull(measurements.rpe_ session_1_srpe, 0) + ifnull(measurements.rpe_ session_2_srpe, 0) + ifnull(measurements.rpe_ session_3_srpe, 0) + fnull(measurements.rpe_ session_4_srpe, 0)
Comments
0 comments
Please sign in to leave a comment.