How to drill on a dimension to get the module to popup like a measure. (Measure Drilling on a Dimension)

Knowledge Drop

Last tested: Mar 11, 2020
 

Drilling on a dimension will bring you to a new page, but if you want to stay on the same page or use visual drilling like you can with a drill on a measure, follow these steps.

If you have a drill field added to a dimension.

EG:
 

dimension: height_high {
type: number
sql: ${TABLE}.height_high ;;
drill_fields: [breed_name,Breed_of_Dog,count]
link: {label: "link url" url:"{{ height_high._link }}&sorts=count+desc" }
}

This will result in an output like this:

Screen Shot 2020-03-11 at 4.59.30 PM.png

These links bring you to a new page, but if you want to get a module to appear. You can use a dummy measure like this.

measure: dummy {
type: number
sql: 1=1 ;;
drill_fields: [breed_name,Breed_of_Dog, count,height_high]
}

dimension: height_high {
type: number
sql: ${TABLE}.height_high ;;
link: {label: "DUMMY MEASURE" url:"{{ dummy._link }}&sorts=count+desc" }
}

The sql 1=1 always returns true, but in the dimension link parameter we reference the dummy measure's drill link via {{MEASURE._link}}.

In the dimension you can also specify vis config and add that to the link parameter.

Then we get a link like this:

Screen Shot 2020-03-11 at 5.03.34 PM.png

Which will fire a module or modal like this:

Screen Shot 2020-03-11 at 5.03.48 PM.png

Which keeps you on the same explore.

Source: https://help.looker.com/hc/en-us/articles/360023589613--More-Powerful-Data-Drilling

This content is subject to limited support.                

Version history
Last update:
‎07-07-2021 01:15 PM
Updated by: