Looker Guide

A practical guide to Looker development

View the Project on GitHub ashrithssreddy/looker-guide

📊 Visualizations in Looker

1. Types of Visualizations

Looker supports the following chart types in its Explore and Dashboard UI — ordered from most frequently used to least:

2. Customizations

Looker provides multiple ways to customize visualizations to match user needs or business branding.

🎯 Axes, Series, Colors

These settings are available per tile in the “Edit” > “Series” and “Plot” tabs.

âž• Table Calculations and Custom Fields

Useful for lightweight transformations without touching backend LookML.

đź§  HTML Tooltips (Advanced)

Looker supports custom HTML in tooltips to show dynamic context when hovering over chart elements.

âś… Where to use:

âś… How to define: In your view file, you can define an html block inside a dimension or measure.

Example:

measure: avg_order_value {
  type: average
  sql: ${TABLE}.order_amount ;;
  html: "<b>Avg:</b> \${value}"
}

âś… Supported tokens:

Tooltips are especially useful when:

📌 Notes:

3. Dashboards

Dashboards in Looker are visual collections of saved queries and charts — often created directly from the Explore UI.

🛠️ Creating from Explore vs LookML

🎛️ Dashboard-Level Filters

Example use cases:

đź§± Layout Options (Tiles, Spacing)

📌 Notes:

4. LookML Dashboards (Optional)

LookML dashboards are defined as code using .dashboard.lookml files — giving you version control, reusability, and programmatic flexibility.

đź§± Syntax: dashboard: and element: blocks

Basic structure:

dashboard: user_summary {
  title: "User Summary Dashboard"
  filters: [ ... ]
  elements: [ ... ]
}

Inside the dashboard block:

Example element:

element: total_users_tile {
  type: single_value
  query: {
    model: ecommerce
    explore: users
    fields: [users.total_users]
  }
}

📊 Static vs Dynamic Dashboards

You can use Liquid variables to customize behavior dynamically. For example:

🤔 When to Use LookML Over UI

Use LookML dashboards when:

📌 Notes:

5. Drill Fields & Interactions

Drill behavior lets users click into a value on a chart and either:

đź§  How to Define Drill Behavior

Drills are defined at the dimension or measure level in the view file.

Example:

dimension: user_id {
  type: number
  sql: ${TABLE}.user_id ;;
  drill_fields: [orders.order_id, orders.order_amount]
}

This means clicking a user_id will show a table of related order IDs and amounts.

đź”— Linking to Explores or Dashboards

Instead of showing fields, you can link to another Explore or dashboard.

Example:

link: {
  label: "View User Details"
  url: "/explore/ecommerce/users?fields=users.id,users.email&user_id="
}

You can also link to LookML dashboards using:

url: "/dashboards/user_summary_dashboard?user_id="

Use link: blocks with url: and Liquid templating (``) to:

📌 Notes