Add a numeric range filter to a Kibana dashboard
Filter dashboard data with KQL, the filter editor, or a Query DSL range clause, and verify that the field has a numeric mapping.
Use a range filter on a numeric field, either through Kibana's filter editor or directly in the KQL search bar. Check the field's units first: a threshold of 500 means something very different for milliseconds and microseconds.
Use the filter editor
Open the dashboard, choose Add filter, select the relevant data view and a numeric field such as response_time, then choose the available range operator. For a bounded interval, use is between and enter the endpoints. Exact operator labels vary by Kibana version.
Inspect the resulting condition if inclusivity matters. Dashboard filters apply to panels that participate in that filter context; panels with different data sources or explicit settings to ignore global filters may behave differently.
Express exact boundaries with KQL
To select responses above 500 and up to 2,000:
response_time > 500 and response_time <= 2000
To select server-error status codes:
status_code >= 500 and status_code < 600
Use one complete expression in the search bar. KQL supports comparisons and and, or, and not. Choose KQL mode before using this syntax; Lucene query syntax is different.
Edit a range query directly
Where the filter editor offers Edit as Query DSL, this filter includes 500 and excludes 2,000:
{
"range": {
"response_time": { "gte": 500, "lt": 2000 }
}
}
This is a range query used for filtering, not a range aggregation. An aggregation groups results; the filter decides which documents enter the analysis.
If the field is missing or the results look wrong
Inspect the Elasticsearch mapping and the data view. A field containing digit-shaped strings is not automatically a numeric field. A keyword range comparison is not a substitute for numeric comparison. Resolve type conflicts across matched indices and refresh the data view's fields if your version requires it.
Save the dashboard to retain its ordinary filters. Pinning a filter makes it available as you move between applications in the session; pinning is not the same operation as saving the dashboard's own filter state.
Numeric literals need no quotes. Strings do not always require them either: quote values when spaces or special characters make quoting necessary. See Elastic's KQL reference.
Contact us
Join the community
to join the community
Try Guance
Start online and pay only for what you use.
Get startedChoose a Guance plan