Question

Drill down with multiple choice


Say I have a list with six flags, true or false. Each row can have true/false in six different metrics.

My dashboard is showing six columns (one per metric) and the counts for each row in the list where that specific flag is true.

What I want to do is to click one number on any metric and return the list filtered by that flag.


Ex:

Dashboard:

Metric1 | Metric2 | Metric3 | Metric4 | Metric5 | Metric6

4 | 2 | 0 | 12 | 4 | 0


When I click “4”, it drills me into 4 rows with information related to customers with that flag set to true on that metric.


I got to the point where I click and shows me a list but all of them are showing everything, no filters 😕


Thanks!


11 replies

Hi Ricardo!


By default, clicking on a measure value (when drill fields have been specified) will produce a drill window with only the rows that “roll up” to that measure value – this is what I believe you are describing as your goal. I have an idea of what may be happening to change that default behavior but I’m not certain based on the information you’ve provided.


Would you mind visiting help.looker.com so we can discuss some more details of your use case? Or you can hop on chat Monday morning, whichever you prefer.


Have a great weekend!


Jiro

Is there an option to have multiple drill down options for a measure or dimension to appear within the drill menu?


Example:


I have a measure labeled as ‘count’ that I want to use as the drill field. When I click on that field, depending on the query used, I want to provide an option to drill down with Set 1 or Set 2 or Set 3.

Userlevel 7
Badge +1

You can use the link: parameter https://docs.looker.com/reference/field-params/link to set up as many “drill down options” as you’d like (and you can name them however you’d like. You can then use the liquid {{ link }} syntax in the link parameter’s URL to add & edit the drill URL— See some examples of that here:



@izzy so in cases where multiple sets are needed, advise is to create links for the measure.


However, from the documentation I’m not sure I understand how to exactly do that.


Say I have two sets, one with fields being [order_id, customer_id, customer_type] (call it detailed) and other with fields [customer_type, average_invoice] (call it generic). I added drill_fields = [generic*]. Now, if I understand correctly, be default URL of drill would be explore/explore_name/view_name?fields=customer_type,average_invoice&limit=500&origin=drill-menu.


How could I amend the fields= part of URL to be fields=order_id,customer_id,customer_type, without hard-coding the whole link and relying on {{ link }}?


Would be grateful if you could provide an example tackling such problem.

 @Mark_Suhhin 

Please find the below link filed that can be used within the measure 

link: {   
      label: "additional Drills"
      url: "https://instance.looker.com/explore/project_name/view_name?fields=view_name.field_set*&limit=500&origin=drill-menu"
      }

Below is the break down of the URL to have a multiple field sets for drilling, So in the field part 

fields=

 all you have to do is use the view_name.Field_Set, which is 

fields=view_name.Newdrillset*

I hope this solves your problem.

 @Mark_Suhhin 

Please find the below link filed that can be used within the measure 

link: {   
      label: "additional Drills"
      url: "https://instance.looker.com/explore/project_name/view_name?fields=view_name.field_set*&limit=500&origin=drill-menu"
      }

Below is the break down of the URL to have a multiple field sets for drilling, So in the field part 

fields=

 all you have to do is use the view_name.Field_Set, which is 

fields=view_name.Newdrillset*

I hope this solves your problem.

 

The only problem with this solution is that it makes it an actual link and not an “explore drill-down” which from what I’m reading can only be done using the liquid {{ link }} method.


Is there a way to work around this?  I’ve been trying various combinations for hours with no avail...

Userlevel 3

Hi spolo,

 

I think you could get what you are after using the workaround from this post

 

You will need to create a dummy field in the process.

 

Best,

I just figured out how to get @Rahul_Ravi  Method to work as a Drill-down Explore vs a linked URL.  When building out the URL: parameter, you need to leave out your Looker’s domain and start with “/explore/….”

 

I got the idea when reading through the Liquid documentation:

https://docs.looker.com/reference/liquid-variables

 

 

As soon as I removed my company’s looker domain, it started working as expected.  Thanks for everyone involved!

Userlevel 3

So good to hear @spolo! Would it be possible to share an anonymised version of the code so we can learn from the solution please? :relaxed:

sure thing @Maddie !  Below is my anonymised version of how I was able to accomplish this task

 

 

  measure: count {
    type: count
    value_format: "#,##0"
    link: {
      label: "COMBO 1 DRILLDOWN"
      url: "/explore/SPOKE_NAME/VIEW_NAME?fields=VIEW_NAME.DRILL_FIELD_COMBO_1*"
    }
    link: {
      label: "COMBO 2 DRILLDOWN"
      url: "/explore/SPOKE_NAME/VIEW_NAME?fields=VIEW_NAME.DRILL_FIELD_COMBO_2*"
    }
    view_label: "Base Data"
    label: "Count"
  }


  set: DRILL_FIELD_COMBO_1{
    fields: [
      FIELD_1
      ,FIELD_2
      ,FIELD_3
    ]
  }


  set: DRILL_FIELD_COMBO_2{
    fields: [
      FIELD_1
      ,FIELD_4
      ,FIELD_5
    ]
  }

Userlevel 3


Great, thanks @spolo!

Reply