Show only certain values

Hey Guys,

im an absolut beginner in grafana.
I’ve got a tank being monitored.
Via Grafana I get the curve displayed and can see when it was emptied.

Now I would like to display the time in a separate panel until the tank has filled up to 50% again.
My idea was this:

IF (SELECT mean(“payload_fields_data_analog”) FROM “mqtt_consumer” < 15.000L)
{

         (SELECT mean("payload_fields_data_analog") FROM "mqtt_consumer";

}
else{

return 0;
}

15.000L is the half volume.
Thats the Code in c, the way I figured it would be.

Is it possible to write something like that in the query?

Thanks for your help :slight_smile: