Historical Average, Min and Max: generate a historical average/min/max and include new data being entered in the calculation
Remember that the Historical Field name MUST be written correctly with the correct casing. Any Historical field names MUST be written with a capital H for the Historical
For example for a field named number, ; "historical Number" will NOT be recognised as a field name, only "Historical Number" will be recognised.
A new function called historicalmean, historicalmax and historicalmin has been created that enables you to have an up-to-date average max and min that includes the data being entered in any new entries
To use the historicalmean, historicalmin and historicalmax functions you would use the History Calculation Field
In the equation text area write in the function before the field that you are generating a historical average for e.g. historicalmean (Historical fieldname)
To generate the historical minimum, use the Historicalmin before the Historical Field name
To ALSO include new data being entered into the event form from the day of entry you will ALSO need to include the Field name in the equation.
When you write the equation to include the historicalmean of a historical field and you want to include the field being entered currently in the calculation you need to write it as
historicalmean (Historical Field, Field name)
These should be separated by a comma (as shown above).
In the example here, the equation will be performed by taking the "Historical Score" and adding the "Score" (from the Daily Review Form). It will then calculate the average based on today's entry and the number (count) of historical records. It does not just take an average of the two fields in the equation by summing them together and dividing by 2. The system actually recalculates the true Historical Mean based on the sum of all Historical Scores, and Today's Score and then divides this by the number of entries (including today's).
The example here shows the two different historicalmean equations in use in the system for the Score
You can see in the first Historical Mean column (only the historical average not including today's) that the mean is calculated from the historical data and returns 21.
The second Historical Mean column includes today's score (of 18) in the calculation and the mean is then updated based on the new entry and returns 20.73.
Setting Date limits: The example in the image here shows a different Historical Mean calculation for Average sleep including today, and also for average sleep over the last 3 days including today
For the historical maximum: To include new max data being entered into the event form from the day of entry you will ALSO need to include the Field name in the equation.
Historical Minimum including today's entry
When you write the equation to include the historicalmin of a historical field and you want to include the field being entered currently in the calculation you need to write it as:
historicalmin (Historical Field, Field name)
These should be separated by a comma (as shown above).
Historical Maximum including today's entry
When you write the equation to include the historicalmax of a historical field and you want to include the field being entered currently in the calculation you need to write it as:
historicalmax (Historical Field, Field name)
These should be separated by a comma.
0 Comments
Add your comment