Skip to content

[Lens] Count Function Doesn't Support the Histogram Field Type Although ES Does #191950

@psypuff

Description

@psypuff

Kibana version:
8.15.0

Elasticsearch version:
8.15.0

Server OS version:
Amazon Linux 2.0.20240816.0

Browser version:
Chrome 128.0.6613.84 (Official Build) (arm64)

Browser OS version:
MacOS 14.5

Original install method (e.g. download page, yum, from source, etc.):
ECK 2.14

Describe the bug:
While plotting a histogram field using Lens, the Count function reverts to count records and the field becomes greyed-out. Also, the count() formula spits a Field <field_name> is of the wrong type warning when trying to use it on a histogram field.

Steps to reproduce:

  1. Create a new Lens visualization
  2. Drag and drop a histogram field onto the graph
  3. Change the function to Count

Or

  1. Create a new Lens visualization
  2. Add a vertical axis item
  3. Switch to formula
  4. Use the count() formula on a histogram field

Expected behavior:
Since Kibana supports the values_count aggregation under the count() formula and Elasticsearch supports histogram fields in the values_count aggregation for a few years now - Kibana is also expected to support counting histogram fields using Lens.

Screenshots (if relevant):

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):

Any additional context:
It seems the histogram is just missing from this list but I'm not familiar with the code and there might be more to it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Team:VisualizationsTeam label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion)bugFixes for quality problems that affect the customer experienceimpact:lowAddressing this issue will have a low level of impact on the quality/strength of our product.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions