Question

Drill Fields - Pivot

  • 2 July 2018
  • 3 replies
  • 544 views

Hey!



Been trying to create drill fields that actually drill into a pivoted table.


For better illustration, the attempt is to drill from user count to a pivoted table where there’s years, customers count and age tiers pivoted. I’ve seen your example on More Powerful Data Drilling, however this does not seem to work.



In the LookML command that is referenced there, is it needed to change the {{link}}? if not, then I’ve correctly used it but it’s still not working.



Would appreciate some advice!


Best,


David


3 replies

Userlevel 4

Hi @davido


There’s no need to change the {{link}} value, think of it as referencing the current link of the Explore you’re viewing.



The below example worked for me:



  measure: order_count {

type: count_distinct

drill_fields: [created_month, users.age_tier, total_revenue]

link: {

label: "Total Sale Price by Month for each Age Tier"

url: "{{link}}&pivots=users.age_tier"}

sql: ${order_id} ;;

}



Can you post your LookML and we can take a look at what’s potentially going wrong? Or you can chat to our team and get to the bottom of things.

Hey @shiggins



Thanks for the fast reply, my LookML looks similar, however still I can’t get the table to pivot.



measure: order_count_users_year {


label: “Total Users - Age Tiers (yearly)”


type: count_distinct


drill_fields: [ registration_year, age_tier, order_count_users_year]


link: {label: “Total users count by age tier (yearly)” url: “{{link}}&pivots=age_tier”}


sql: ${registration_number} ;;


}



What am I missing out? :[

Userlevel 6
Badge

In URLs all fields need to be fully qualified. You probably need



"{{link}}&pivots=users.age_tier"

Reply