Use variables to select subscription and workspace for azure data source

I am trying to create a dashboard which we can switch between our environments using variables, my credentials can see all our log analytics workspaces in azure (one per environment).

But I’m not sure how on the query tool how I can add these variables in? I’ve setup $subscription as a datasource type and this returns the human readable names of my subscriptions, but if I add $subscription as my subscription in the GUI it seems to end the human name not the guid so it fails, I also can’t see how I can select the workspace programatically.

Is what I’m trying to do possible? If not what is the recommended way to create one dashboard which can switch its data source?

Thanks in advance!

Hopefully the below image shows me trying to add vairables for the subscription and workspace, but I can’t currently get the query to work: