Drill down example

Searching all kinds of sources on the web I still didn’t came across a simple explanation or example how to set up drill down functionality. I am using v5.4.2. So I have a table panel showing some aggregated data and want to show details of a particular line in another dashboard. I use Postgres as a source and managed to set up a drill down link that passes the current value in the url, like ?var-v_booking_id=‘booking_001’. But I don’t know how to filter the detailed dashboard to only show details for that particular booking_id. I created the same variable ‘v_booking_id’ in both dashboards of type ‘Ad-hoc filters’. How do I pass the variable value to the query so it gets filtered?