"Add field from calculation" total of numeric columns sometimes concatenates

  • What Grafana version and what operating system are you using?
    9.4.3, Ubuntu 22.04, Chrome

  • What are you trying to achieve?
    Compute the sum of sparse numeric rows in a table.

  • How are you trying to achieve it?
    Using the “Add field from calculation” → “Total” transformation.

  • What happened?

The “total” operation starts treating “+” as concatenation after there’s an empty cell in the row, even though each column is considered “numeric.”

I also tested cases where, for example, the columns are 10, 5, empty, 5, which results in 155 (it sums 10+5, and then concatenates 5.)

  • What did you expect to happen?
    The “total” operation should sum numeric rows, treating empty cells as 0.

What can I do to achieve the expected behavior? I did some transformations on Prometheus data which led to this table having empty cells; is there a way to populate a 0 into those cells instead?