Ambiguity with firstvalue and lastvalue historical calculations

It was uncovered that there was ambiguity regarding interpretation of the firstvalue and lastvalue calculations

Some users were using last value, as the first value and vice versa. This ambiguity has been addressed and the descriptions clearly state what each calculation will return.

First Value: returns the first ever entered value

First Value: returns the first ever entered value

Remember, when you use historical calculations, they do NOT calculate on the first record ever entered (as there is not history). But, additional records will show the correct value.

The firstvalue calculation shown here calculates the first ever entered value.

Last Value: returns the last entered value (e.g. the most recent)

Last Value: returns the last entered value (e.g. the most recent)

In this example, the lastvalue will return the data point entered last on the system (e.g. most recent date).

Firstvalue historical calculation that includes today's data

Firstvalue historical calculation that includes today's data

You can write in historical calculations to include the value entered on that day. The example here shows that the first value ever on all existing data will be returned, or the data point from today will be used (slightly redundant for use with the firstvalue calculation as the first value will only ever be returned).

Last Value including today's data

Last Value including today's data

You can write in historical calculations to include the value entered on that day. The example here shows that the last value from all of the existing data will be returned, or the data point from today will be used (e.g. today's data). Again not a good example of the use of this field.

The image here shows data being entered over a period of a week

The image here shows data being entered over a period of a week

YOu can see here that the first ever entered value (first value) will be calculated from the 13th January data; this will return 1.0.

The last ever entered value will change to show the value before the current one (if using lastvalue (Historical Number), or to return the last ever entered value (if using lastvalue(Historical Number, Number). The image in the step below shows the output for each calculation

When the historical calculations are run, you can see what results the firstvalue and lastvalue calculations return

When the historical calculations are run, you can see what results the firstvalue and lastvalue calculations return

The image here shows that the firsvalues calculations always returns the first value ever entered. The Last Value shows the last entered value historically (e.g from the previous record), or the last ever entered value (across all records).

If you open the last entry that has been made, you can see that the values show correctly.

Double check that all of your existing Event Forms are set up so that the first or last value calculations reflect the data you are trying to show.

N.B. If your calculations are not set up correctly, you will need to run a resave on the data. This is best done outside of normal work hours

N.B. For each resave, please follow correct protocols. If you have a lot of data, or complex forms you must inform your distributor so that they can monitor your system

0 Comments

Add your comment

E-Mail me when someone replies to this comment