Show + symbol on positive numbers

Hi everyone, I’m using Grafana v9.3.1 and trying to get a ‘+’ symbol to show in front of positive numbers for my stat panels. I’ve tried converting the number to string and using regex but haven’t been able to get this to work.

Any help would be appreciated.

image

Have you had any luck finding a solution for this? Trying to do the same.

what is your data source, might be easier to do it there.

In my case I have a simple expression to get a percentage of relative change: ($A - $B) / $B

I’m using postgresql as my data source.

1 Like

so you want
($A - $B) / $B’s result as 23.5 %?

Since the formula is showing relative change, I just want a “+” or “-” before the percentage to make it clearer that it’s indicating change. Negative percentages show the “-”, but positive just shows the normal percentage (which could be confused as an absolute percentage rather than the change in percentage.

1 Like

cool. please provide real examples with numbers.

See screenshot - two graphs with the bottom red and green numbers showing the percentage of change relative to the previous timeframe. The red negative value on the left has the “-” correctly, and what I’d like is for the positive percentage on the right to have “+” before it to more clearly indicate that it’s reflecting change rather than an absolute percentage.

1 Like

Surely there’s a simple way to do this?