"SingleMath" visualization support will end soon

“SingleMath” visualization support will end soon.
And we need to keep that function. This means that the MAX-MIN calculation will be performed for the selected period.

Unfortunately, I have not been able to achieve this in any other visualization.

Can someone tell me how to do this?

Thanks a lot!

Try to use built-in Stat panel and move calculations either to your query or to the transformation:

IMHO you can do that query level - I would use one query with SPREAD instead of 2 queries with MAX/MIN:

So you may not need any math on the Grafana level at all.