Position(or numeric ranking) of a item in an aggreagation

Hi!
I have this problem.

Suppose I have an index to store products sales.
And I want to define a visualization (potentially a table) with the following information:
Product Name, ranking in number of units sold, ranking in total amount of sales.

Example

  • Product A, 1st in number of units sold, 3rd in total sales amount

Is the problem understood?

Do I have a way to do it through Kibana / Elastic?

Thanks in advance,
Pablo

Can you provide an example or visual mockup of what you are trying to achieve?

Are you looking to create intervals of number of units sold (range aggregation), and then sort products by sales within that interval (top hits)? You can do that in Lens with a data table visualization:

If you are looking for non-aggregated data, then the secondary sort only applies when multiple products are tied in ranking of the same number of units sold.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.