Anyone familiar with Looker knows that it is an extremely robust tool with tons of features that can go unnoticed. Power users seek out these features and build them into their Looks and dashboards in clever ways.  Here are a collection of tips and tricks I’ve found and observed that helped my visualizations look more buttoned up, expedited my time to code, and helped me navigate through Looker faster.
Note: The Windows equivalent to the shortcuts are placed in parentheses.

Better Visualizations

When it comes to visualizations, being able to adjust the formatting of the values displayed on the measures/the axis and choose which measures will have values displayed in the visualization can help elevate dashboards to the next level.

As seen above one can use value formats to create streamlined visualizations where the axis do not create excessive white space. To do so navigate to the edit menu and under y use value formats to make your axis easier to read. We can also use the same value format code to create abbreviated value labels.
In the code we use M for numbers greater than a million, K for numbers greater than one thousand and no abbreviation for numbers less than one thousand).
For positive numbers: [>=1000000]$#.#0,,\M;[>=1000]$#,##0,\K;[>=1]$##0
For negative numbers: [<=-1000000]-$#.#0,,\M;[<=-1000]-$#,##0,\K;[<=-1]-$##0

As shown above, for visualizations, under values, you can hide values on certain columns by using “transparent” under value colors. Note:  Be sure to use the same order as the legend to ensure you are hiding your intended column’s values from the visualization.

As shown above, use option + click (alt + click)  to show a singular bar within a bar chart with multiple bars; use option + click (alt + click)  again to reveal all the bars again.

LookML Secrets

Both, quickly browsing through LookML to find views and editing big chunks of code can be accomplished with the help of a few keyboard shortcuts.

As seen above,one can save a decent amount of time by finding views or objects in Looker with cmd + j (ctrl + j).

As seen above, Cmd + click/drag (Ctrl + click/drag)  on different objects for multiple cursors; can also be used to copy segments of code in different locations throughout the view file.

Efficient SQL Runner

Looker’s SQL runner provides developers with a fast way to query data and create derived tables using the data warehouse; In addition, you can use sql runner to quickly make mass adjustments to your code by using the find and replace function.

As seen above, one can avoid doing the same style of formatting by pasting and editing one’s lookml with sql runner and cmd + F (ctrl+F). Use Looker’s inbuilt find and replace function to quickly add or edit code.

As seen above, one can use the “gear icon + build as derived table” to quickly create derived tables based on a sql query. This way one can quickly create fields based on the sql rather than manually having to code them in the LookML.

With these marginal improvements, one can have a much more enjoyable experience creating streamlined visualizations and coding in Looker. With these tips and tricks, one will be able to spend more time problem solving and tackling the reporting needs of the business.


Naveed

 

Naveed is data engineer and analyst with a sharp eye on business outcomes. Combined with excellent communication, he will drive any organization to become more data driven.


Data Clymer is a premier consulting firm specializing in full-stack analytics and data culture transformation. Our proven methodology includes full data stack implementation, data democratization, custom training, and analytics to enable data-driven decisions across the organization. We have curated a set of best practices from our deep expertise in Snowflake, Sigma, Looker, Matillon, DBT, Fivetran, Tableau, BigQuery, and more. 

If you need professional help, contact us or follow us on LinkedIn.