Need help for concatenating of two variables for graph panel

I have two variable in my dashboard and I need to concatenate both variables

The actual full name is of the transaction is Direct_microsoft.com which is the input from Influxdb and I have 96 similar transactions. For the dashboard purpose, I split this into two variables

var1=Direct
var2= microsoft.com

When I’m trying to plot out in a graph panel by using the below query

SELECT last(“avg”) FROM “jmeter” WHERE “application” = ‘proxyNetstat’ AND “transaction” = ‘[[var1]]_[[var2]]’ AND $timeFilter GROUP BY time(10s)

and I’m getting an output as below which is incorrect

SELECT last(“avg”) FROM “jmeter” WHERE “application” = ‘proxyNetstat’ AND “transaction” = ‘(Direct)_(microsoft.com)’ AND time >= now() - 5m GROUP BY time(10s)

and also i’m getting the error as "error parsing query: found ., expected identifier, string, number, bool at line 1, char 112

My requirement output is SELECT last(“avg”) FROM “jmeter” WHERE “application” = ‘proxyNetstat’ AND “transaction” = ‘Direct_microsoft.com’ AND time >= now() - 5m GROUP BY time(10s)

Please suggest me how to plot the graf by using the above variables.

Regards,
Venkat