Custom variables losing when the dashboard first loaded

I am trying to use a custom variable to query data using influxDB.
However, every time I open the dashboard, the custom variable does not work unless I select the custom variable.
How I can fix this problem to make the custom variable have a default value, so it doesn’t need me to select one first.