Create Kibana Lens visualizations: verify data views, aggregations, and filters
Kibana Lens is an editor for building charts, tables, metrics, and other visualizations by dragging fields into place. To get a trustworthy result, first check the data view and time range, then verify which documents each axis, row, and metric includes and how they are aggregated. A chart created quickly can still mislead if its aggregation or filters are wrong.
This guide follows Elastic’s official Kibana documentation reviewed on 19 November 2026. The interface and features vary by Kibana version and deployment. The point-and-click workflow uses a data view; the ES|QL path can query indices directly. No live cluster test is claimed.
Check the question and data first
State one question, such as “What are the request count and average response bytes by host over the past 24 hours?” Specify the measure, grouping and time range.
Confirm data is indexed and, for the point-and-click editor, an appropriate data view exists. Check its indices and time field, and verify that date, numeric and category fields have the expected meaning and mapping.
Set the time filter and aggregation grain: document count or average, by hour or day, must match the question.
Choose the visual form: lines for change over time, bars for category comparisons, tables for exact values. Add colors or layers only when they aid distinction.
Build with fields
Open Lens from a dashboard or the visualization library and choose a data view. Drag fields into the workspace or layer pane. Lens suggests functions based on field types, such as Date histogram, Top values, Sum, Average or Count. Open each field’s settings and confirm the suggestion is appropriate.
For a bar chart, use host as a row dimension and request count as a metric. For a time trend, put a date histogram on the X axis and a metric on Y. In a table, set row groups and metric columns, then check labels, number formats, sorting, units and missing values. Do not compare unlike units on the same axis or legend.
Add a visualization, annotation or reference-line layer only when needed. Check how time and global filters, axes and legends apply to each layer. A reference line can be static, calculated with a quick function, or formula-based; match its units to the chart. Lens formulas are panel-specific and computationally intensive, so reserve them for necessary comparisons.
Control comparisons with filters
The query bar filters the whole visualization. KQL filters in the layer pane can target one layer, letting you compare filtered and unfiltered data together. Supported legends can include or exclude a selected value. A pinned global filter can be reused across apps, but if the field is absent from a data view it may be ignored and shown in another color. Pinned filters may not be saved with a dashboard or visualization, so verify filter state before sharing.
Save and validate
From a dashboard, choose Save and return to add the Lens visualization, or Save to library for reuse. Library panels remain linked, so edits can affect every dashboard using them. A panel created directly on a dashboard may be lost if removed without saving it to the library. Give the dashboard a clear title and description, add the visualization, and save the dashboard.
If the result is wrong, check in this order:
**Empty field list or values:** verify the data view, time range, field presence and indexed data. ES|QL can query named indices directly and may not require a data view.
**Unexpected value:** open Inspect and compare Data with Requests. Tables can be downloaded as CSV for checking rows and aggregation grain. Top values may show only selected categories or group the rest as Other.
**Unfair comparison:** check that global time and layer filters select comparable documents, and that metric and units mean what the chart implies.
**Different result after sharing:** check whether the saved dashboard link uses relative or absolute time. Recipients need access to the same Kibana instance and view permission. A temporary link from unsaved changes may not remain valid.
Validate the documents, filters, intervals and aggregations behind the picture, not just its appearance. Inspect the actual data and requests, then check that the intended reader reaches the same conclusion with the default time and filters before sharing.
Sources
[Elastic: Lens visualizations](https://www.elastic.co/docs/explore-analyze/visualize/lens)
[Elastic: Create a dashboard from Kibana UI](https://www.elastic.co/docs/explore-analyze/dashboards/create-dashboard)
[Elastic: Build tables with Kibana](https://www.elastic.co/docs/explore-analyze/visualize/charts/tables)
[Elastic: Export and share dashboards](https://www.elastic.co/docs/explore-analyze/dashboards/sharing)
[Elastic: Inspect and filter a dashboard](https://www.elastic.co/docs/explore-analyze/dashboards/using)