Skip to content
Salesforce Dictionary - Free Salesforce GlossarySalesforce Dictionary
Full Lens Explorer entry
How-to guide

Build a lens in the Lens Explorer

Building a lens in the Lens Explorer is a no-code task done inside Analytics Studio. You start from a dataset, shape a question with fields and filters, then save or clip the result. These steps cover the common path from blank lens to a chart you can reuse.

By Dipojjal Chakrabarti · Founder & Editor, Salesforce DictionaryLast updated Jun 16, 2026

Building a lens in the Lens Explorer is a no-code task done inside Analytics Studio. You start from a dataset, shape a question with fields and filters, then save or clip the result. These steps cover the common path from blank lens to a chart you can reuse.

  1. Open a dataset in Analytics Studio

    In CRM Analytics, go to Analytics Studio, find the dataset you want to explore, and open it. CRM Analytics creates a new lens against that dataset and shows the Lens Explorer with every available field listed on the left.

  2. Set the measure and grouping

    Pick the measure to aggregate, such as sum of amount or count of rows, then add one or more dimensions as groupings. The chart updates immediately. Add a second grouping when you need a nested breakdown like amount by stage within region.

  3. Filter and choose a chart type

    Apply filters to narrow the records before aggregation, then switch the chart type to match the question. Use table mode for exact numbers or a compare table when you need calculated columns combining several measures.

  4. Save the lens or clip it to a dashboard

    Save the lens with a clear name so it can be reused, or clip it to a new or existing dashboard to turn it into a widget. Clipping carries the query and chart configuration into the dashboard designer for further layout work.

Chart moderemember

The default visual view offering bar, line, donut, scatter, heat map, and other chart types for the current query.

Table moderemember

A grouped row view that shows exact aggregated numbers rather than a chart shape.

Compare tableremember

A spreadsheet-style view where you add columns and write formulas to compute derived metrics across measures.

SAQL moderemember

Direct access to the Salesforce Analytics Query Language query behind the lens for features the no-code UI does not expose.

Gotchas
  • A lens queries one dataset only. If a field is missing, fix the dataset build or recipe rather than expecting the Explorer to add it.
  • Lenses show data as of the last dataset refresh, not live CRM records. Stale numbers usually mean a dataflow or recipe has not run, not a lens bug.
  • Slow lenses are almost always a dataset problem. Trim fields and row counts at the data layer before tuning chart settings that were never the bottleneck.
  • SAQL written by hand can drift from what the Explorer expects. Edits made in SAQL mode may limit some point-and-click options afterward, so save a copy first.

See the full Lens Explorer entry

Lens Explorer includes the definition, worked example, deep dive, related terms, and a quiz.