User Guide Getting Started Help Center Documentation Community Training
New LookML
Old LookML
New LookML


view: view_name {
  dimension: field_name {
    link: {
      label: "desired label name"
      url: "desired_url"
      icon_url : "url_of_an_image_file"
    # Possibly more links



Possible Field Types

Dimension, Measure


Various parameters


The link parameter makes it easier and more useful to add Looker links and other external links to your dimensions and measures. The form of a link parameter is:

dimension: field_name { link: { label: "desired label name" url: "desired_url" icon_url: "url_of_an_image_file" } # Possibly more links }

The link parameter has several child parameters:

For example, you can use the link parameter to direct users to related Looker Explores or dashboards that aren’t automatically generated by using drill_fields. For example, this is one URL format often used to direct to a related Explore:

dimension: city { sql: ${TABLE}.metro ;; link: { label: "Another Awesome Explore" url: "/explore/model/explore_name?fields=view.field_1,view.field_2,&f[view.filter_1]={{ value }}" icon_url: "" } }

That dimension would produce a link menu like the one below:

The example above includes a sql parameter. If sql is left unspecified, then Looker assumes that there is a column in the underlying table with the same name as the field.

Link Behavior

When the user clicks on a link, Looker will open the link in either a new browser tab or in the same tab (or iframe, for embedded queries):

A user must have either the explore or see_drill_overlay permission to access links.

Liquid Variables

The link parameter supports Liquid variables to make links dynamic. For example, suppose you had an artist_name dimension, and wanted the user to have the option of executing a Google search for that artist. You could use the value Liquid variable to create a dimension like the following:

dimension: artist_name { link: { label: "Google" url: "{{ value }}" icon_url: "" } }

The user’s experience for this dimension link would look like this:

Passing a Query’s Filter Values Into a Link

Another Liquid variable supported by the link parameter is _filters['view_name.field_name']. This variable takes the values entered for a filter and passes them on to a linked query, dashboard, or Look.

If you are passing the filter from a dashboard, the _filters['view_name.field_name'] must refer to a field type filter.

Here is an example of a dimension that uses the _filters variable in its link parameter:

dimension: name { link: { label: "Business Pulse By State Dashboard" url: "{{ _filters['users.state'] | url_encode }}" } }

In this example, if a user filters a query on the users.state dimension, the state(s) chosen by the user are captured and used in the link, so that the linked dashboard is automatically filtered by the same states as in the query. This is shown below, where the user has filtered a query by the state “California.” The link opens the dashboard, already filtered for California:

This also works for passing filter values to linked Looks and Explores:

dimension: name { link: { label: "Average Order Profit Look" url: "[users.state]={{ _filters['users.state'] | url_encode }}" } link: { label: "User Facts Explore Explore" url: ",[users.state]={{ _filters['users.state'] | url_encode }}" } }

Also note that you can pass multiple filters using &, such as in the URLs specified below:

dimension: name { link: { label: "Business Pulse By State Dashboard" url: "{{ _filters['users.state'] | url_encode }}&Date={{ _filters[''] | url_encode }}" } link: { label: "Average Order Profit Look" url: "[users.state]={{ _filters['users.state'] | url_encode }}&f[]={{ _filters[''] | url_encode }}" } }

Linking to Dashboards and Looks: Please keep in mind that a linked dashboard or Look must be configured with a filter that can accept the specified filter values. In the example above, the “Business Pulse by State” dashboard is configured with a filter on users.state, so that _filters['users.state'] information in the link can be applied to the dashboard.

If a dashboard or Look does not have a filter that can use the passed values, the link will still work, but the filter values will not be applied to the dashboard. For information on creating dashboard filters, see this page for LookML dashboards and this page for user-defined dashboards.

Linking to Explores: When setting up a URL for an Explore, open the Explore in a browser and add a filter. Then, from the Explore’s gear menu, select Share and then copy the Expanded URL. In the expanded URL you can see where the filter values are specified and replace them with your _filters variable. See this Community topic for information on the parts of a query URL.