How can I use a transformation in an expression?

Hello,

I am have been manipulating data sets using transformations but have not had a way to use that transformation in an expression.

Is there a way to add this transformation into a way that I can do math on it, or must those steps be completed before the transformation?

This image contains a flow meter with the cumulative sum transformation. After this point I can not extract the cumulative sum to do math on.

I was hoping for some help if there is a work around, as I am very new to Grafana.

Best Regards,

A ReadOnly Viewer

Hi,

You can’t do this via Expressions, because Expressions run before Transformations in Grafana’s pipeline (Query → Expressions → Transformations → Panel) → so an Expression can never see a transformation’s output.

The workaround → chain a second “Add field from calculation” transformation right after your Cumulative Sum one. Transformations execute in sequence, so the second transformation can select your cumulative field as input and do math on it (Binary/Unary operation).

Transformation 1: Add field from calculation → Cumulative functions → Sum (your existing step)
Transformation 2: Add field from calculation → Binary or Unary operation → select the cumulative field and apply your math

Screenshot below shows this working → the Cumulative Value column (from step 1) and a Cumulative/10 column (math applied on top of it in step 2)