Exclude zero values in the mean calculation of the table footer

  • What Grafana version and what operating system are you using?
    v10.4.2

  • What are you trying to achieve?
    I want to calculate the mean of all non zero grouped values by “tray”

image

  • How are you trying to achieve it?

Right now I’m using the Table property: show table footer → calculation: mean
image

  • What happened?

The mean values are skewed by the zero values, They only need to consider all the non zero values

  • What did you expect to happen?
    A mean value based on all the filled in values in the column

  • Can you copy/paste the configuration(s) that you are having problems with?

/

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

/

  • Did you follow any online instructions? If so, what is the URL?
1 Like

Same issue here, I’ve tried transformation filters, value mapping conditions, nothing seems to work. I guess Grafana doesn’t allow this simple kind of calculation. I’ve also tried to remove the values using SQL, adding a string ‘-’ when the value is zero, the footer didn’t calculate the mean anymore.

that table plugin cannot do that at this moment

but you can do it using business text plugin with html