drill_fields (for views)

This page refers to the drill_fields parameter that is part of a view.

drill_fields can also be used as part of a dimension or measure, described on the drill_fields (for fields) parameter documentation page.


view: view_name {
  drill_fields: [field_or_set, field_or_set, ]
Possible Field Types
Dimension, Dimension within a Dimension Group, Measure

A square-bracketed list of field names or set names


The drill_fields parameter controls what happens when a user clicks on the value of a table cell while exploring data. When a user does this, they "drill" into the data, allowing them to see the individual records that make up that cell, limit their query to the cell's value, or slice the data in a related way.

The drill_fields parameter accepts a list of fields, sets, or a combination of both fields and sets.

At the view level, drill_fields applies the declared drill fields to all measures in the view that do not have drill_fields defined at the measure level.

Drilling can be disabled by including in the query a dimension with the can_filter parameter set to no.


Suppose you have the following LookML:

view: orders {
  drill_fields: [source*, age]
  measure: count {
    type: count
  measure: average_age {
    type: average
    sql: ${age} ;;
    drill_fields: [id, name, city, state]
  set: source {
    fields: [traffic_source, country]

Drilling into the Average Age field displays the ID, Name, City, and State fields. Drilling into the Count field displays the default Traffic Source, Country, and Age fields.