How to get negative difference in non negative form

Hello,

I have hit a scenario where i need to convert the negative difference returned by difference() into a non-negative value. Is there any way to do this.

Background :

I have a field which always gets a non-negative value which will always be increasing. difference() and non-negative difference() does value@t1 - value@t2 which results in a negative number in my case. I would like do the reverse i.e., value@t2 - value@t1.

Is there anything apart from the diff() or non-negative-diff() which can be used?

Was able to achieve by multiplying the final value by -1. However I’m still looking for a proper way to handle this.