How to update value of Cell only if its greater than the one in the last time step

This is a bit difficult to explain so bear with me.
I have whole bunch of particles which change position and magnitude as time passes but I only want to update the magnitude if its bigger than the last-
i.e. I want each cell to hold the greatest magnitude it has had over the whole time series.
I know this might be easier than I think but my current knowledge of Paraview is a bit rudimentary and I would greatly appreciate your help!

PlotDataOverTime ?

So I tried the plotdataovertime but I want to apply a python calculator over a timeseries for each point- i.e something like a script to update values of each cell only if the value increases.
Would that be possible in the python calculator filter because from the little knowledge I have, I can only apply the script to deal with each timestep separately.

No, only in a ProgrammableFilter using CONTINUE_EXECUTING.
Not a trivial task if I’m being honest.

I see.
I was wondering if I can apply the temporal shift filter to shift data one timestep back and then perform the needed comparison between the two sets of data?
Of couse this is with a rudimentary knowledge of the temporal shift filter and I would be grateful if you could guide me to any documentation of the programmableFilter.
Cheer

You can easily compare timesteps with the ForceTime and the PythonCalculator, but you will not be able to integrate over time.

So I can do it for one step but it wont be easy to do it for all? Is that because Forcetime can only take an absolute value and not a variable one like (n-1)?

Yes.