When working with arrays in PI Analysis it would be nice to be able to compare a current value against the previous or next value. I have figured out that I can use PrevVal in the MapData function, however it appears that this goes back to data archive to do an evaluation on each data point.
It would be nice to have something like $prevval and $nextval to compliment $val. Obviously any equations that use $prevval couldn't be evaluated on the first array item and similarly $nextval couldn't be evaluated on the last array item.
See attached screenshot for how I was able to get this working, however this isn't very efficient. The necessary data was already in the array, but no method to previous/next value in the array exits.