I just create new panel in a dashboard with the same syntax from anohter panel and it doesn't work. for example I copied query from withdraw by peer panel in Top By prefixes dashboard, the query is SELECT $__timeGroup(interval_time, $__interval) as time, sum(withdraws), p.PeerName as metric FROM stats_chg_bypeer l JOIN v_peers p ON (p.peer_hash_id = l.peer_hash_id) WHERE $__timeFilter(interval_time) AND l.peer_hash_id in ($peer_hash) group by peername,time order by time
I create new panel, and paste that query to it. It comes error db query error: pq: syntax error at or near "$". I suspect grafana macros for Postgresql is not working while I create new panel in a dashboard. Any solution?

I just create new panel in a dashboard with the same syntax from anohter panel and it doesn't work. for example I copied query from withdraw by peer panel in Top By prefixes dashboard, the query is
SELECT $__timeGroup(interval_time, $__interval) as time, sum(withdraws), p.PeerName as metric FROM stats_chg_bypeer l JOIN v_peers p ON (p.peer_hash_id = l.peer_hash_id) WHERE $__timeFilter(interval_time) AND l.peer_hash_id in ($peer_hash) group by peername,time order by timeI create new panel, and paste that query to it.

It comes error db query error: pq: syntax error at or near "$". I suspect grafana macros for Postgresql is not working while I create new panel in a dashboard. Any solution?