Dashboard Variables for Postgres Metric Database Name

Hello,

I have several sensor data in a postgres database.
The values are stored in monthly tables (i.e. SENSOR201804) to reduce backup effort.
How can I use variables to write the appropriate metrics?

Please help me!