Need suggestion to use URL variable in Query

i have 2 dashboard D1 and D2 . When click on one cell in D1 then its opening new tabs for dashboard D2.

D2 URL look like as below :
https://21000/d/2Y9k89DW/whole_process_tmon_v2?var-host=M2R_DFANE_SNP_DEMETER_EQTY&panelId=2&fullscreen&edit&orgId=1

I want to use *var-host=M2R_DFANE_SNP_DEMETER_EQTY * in QUERY which changing for each cell.

Kindly suggest.