Transformations randomly don't work properly

Grafana 9.1.1
InfluxDB 1.8.3
Ubuntu 22.04

Hello,

I am using Stat Panel, with two queries, A and B.
In transformation tab I use “Binary operation” B / A.
Transformations are randomly not working, showing NaN as value, mostly when I select time period “Last X hours / Last X days”.

When this occurs, in debug window is visible that there is one empty value in values buffer which are used in Binary operation.

Instead of a Transformation, have you tried using an expression? (see example below)