Gauge panel and inverse of the negative values

Hi, everyone!
Im using free tier of cloud version of Grafana. My data source is goole spreadsheet with small amount of data that is appended every 24h.

I have a straight forward task of making a gauge panel that would show the difference of how much “stuff” is left in “the thing” today compared to last week. In other words: last week there were 2 amount of “stuff”, today it is 10, so I need the gauge to display number 8.
To do that I use transformations. First I hide unwanted columns using “Organise fields”. Then I sort by date using “Sort” (with reverse). Then I limit the number of items to 7 using “Limit”. Finally I use “Difference” in calculation section of options panel.
I expect to see number 8.
What I get is the “-8”. And vice versa: if the amount of stuff decreased I expect to see “-8” but I get “8”.

I tried to mitigate that by using another Sort transformation to reverse the order of items. But it doesn’t seem to have any effect on the calculation result, though when I look in the table view the first and last values a clearly changing when I toggle Sort on and off.
I don’t see any errors or warning messages. The rest of the dashboard that uses the same data source is perfectly fine.

  • I wonder is if there are a way to make calculation “Difference” do what I am trying to achieve?
  • Or may be there a way to simply inverse the negative and positive values, something like multiplication by “-1”?
  • Or perhaps I just unaware of some proper way of achieving the result that I’m looking for.