Hey Team,
I was exploring the Looker button and markdown options to link two dashboards together. Yes, I was able to link them using the dashboard link, but I wasn’t able to pass the dashboard filter values to the linked dashboard.
I know this is possible by adding the dashboard link in LookML via dimensions and measures.
dimension: name {
link: {
url: “https://learn.looker.com/dashboard/249?&State={{ _filters[‘users.state’] | url_encode }}”
}
I tried using same expression `State={{ _filters[‘users.state’] | url_encode }}` but is was not working for passing dashboard filter values from dashboard markdown and button options. Can we also pass dashboard filter values to the linked dashboard using the Looker button and markdown tile?
You can't access the dashboard filters from a markdown tile, unfortunately. I am not clear on which part of the process of linking a dashboard via a dimension or measure did not work though - I wonder if you could clarify?
Passing dashboard filters through dimensions or measures is working fine, but the same expression is not working when I use it in the dashboard markdown or button options. What is the correct way to pass dashboard filters to another dashboard link?
Apologies for the confusion in my earlier question.
Yes, so we can't access those filters from Markdown tiles, unfortunately. But we can create, for example, a single value visualisation based on a dummy dimension (i.e. the dimension is not based on anything in your database) and then use that single value visualisation to show an image (of a button or something) that can then be used by a user to click on and take them to your new dashboard with the dashboard filters. For example, in the dashboard image below, the picture of Kermit the Frog is actually a single value visualisation that just shows that image, and it acts as a button to take the user to a new dashboard:
Here is the code that is used to create that dimension - if you substitute your instance name and the dashboard details, it should work for you too. I would have pasted the code but it seems this forum will not let me do so in this case.
By the way, there's a whole Cloud Skills Boost course on using Liquid HTML like this in Looker, in case it is helpful.