Designing Drills
Being able to drill through and into all of your data is one of Looker's great strengths. While the default options cover most cases, sometimes you need to apply a little LookML & Liquid magic to get the perfect drills set up.
For example, imagine you have a 'return rate' measure, which is a number type measure which calculates returned items/items sold. You can specify drill fields as with any other measure, but this won't work as expected and the drill modal will show all records.
We can add a drill option to show the returned items behind the rate, by borrowing the drill link from another measure!
The returned_count
measure uses a returned yesno
filter, and its drill link will include that filter, so we can make our own link on the return rate measure. Using Liquid we can get the number of returned items, and the URL from the count measure, which shows the correct drill modal when clicked, including the returned
yesno
filter.
You can use this idea to create customised drill links and build a tightly integrated user experience.