So, I have a model that has all the lines of data for a customer, whether a license is active or expired (this is necessary for customer records). I want to drilldown on the count of servers, but when I do, I get all the lines from the customer. Is there a way that I can filter the drilldown set in the view.lkml using the filters: parameter to do something like filters:[“status = active” & count > 1]
Solved! Go to Solution.
Hi AnnS,
You can customise the drill-down options given by using the ‘link’ parameter.
In this case, you can customise the filters that get applied by adding in the LookML in red below (replacing ‘view_name’ with your view name, and ensuring that dimension/measure names match up properly):
measure: count_servers {
type: count_distinct
sql: ${server_id} ;;
drill_fields: [detail*]
link: {
label: "Drill-down filtered on active licenses"
url: "{{ link }}&f[view_name.status]=active&f[view_name.count]=%3E1"
}
}
This will give you a drill-down option labelled "Drill-down filtered on active licenses", which returns the previous drill down results but filtered on status = ‘active’ and count > 1.
Best wishes,
Shaan
Hi AnnS,
You can customise the drill-down options given by using the ‘link’ parameter.
In this case, you can customise the filters that get applied by adding in the LookML in red below (replacing ‘view_name’ with your view name, and ensuring that dimension/measure names match up properly):
measure: count_servers {
type: count_distinct
sql: ${server_id} ;;
drill_fields: [detail*]
link: {
label: "Drill-down filtered on active licenses"
url: "{{ link }}&f[view_name.status]=active&f[view_name.count]=%3E1"
}
}
This will give you a drill-down option labelled "Drill-down filtered on active licenses", which returns the previous drill down results but filtered on status = ‘active’ and count > 1.
Best wishes,
Shaan
Thank you! That worked perfectly!