How to use variable panel fields

Hello, I am a new Grafana user, and I was wondering how I could use variables in the fields of a gauge panel. For example, I would like to use a variable named test with a value of 8 to this gauge panel’s maximum value. However, this does not work as expected, and the gauge’s maximum value is unchanged.

Is there a way to do this?