# Build a Ranking Table

### **What is a ranking table?** <a href="#what-is-a-ranking-table" id="what-is-a-ranking-table"></a>

Ranking table displays columns of data, where there is always one column ordering all the other columns in the table by default.

![](https://crystal-1aa63e8abb35.intercom-attachments-7.com/i/o/258718783/6aa8394960dda55fe3d7971a/Ezmx9DbKGvNrHWT6SuY6cpPIhRwB3KvvLQreePAfaSCTPoWB82XqLcO_TfIxfPddWEv9lC6ptgquOZIDXVe0b8AmgZ3evY-Kn0LMTdBlbYeOD5duhkPQibZsMdeXZ_-hMacFBYY3?expires=1618920000\&signature=8fd3c680f4851bf4eaaffa4cc288422a0f6d89106122cdf4ee48712b77a19404)

### **When is it used?** <a href="#when-is-it-used" id="when-is-it-used"></a>

A ranking table is used to show a relationship between a set of items: for any two items, the first is either 'ranked higher than', 'ranked lower than' or 'ranked equal to' the second. For this reason the ranking table must have at least two columns.

It can be used to sort values from the highest to the lowest or vice versa, for example to establish the best and worst selling performers of the month.

### **How to configure a ranking table** <a href="#how-to-configure-a-ranking-table" id="how-to-configure-a-ranking-table"></a>

The user selects the variables that will be shown as columns in the table. The order in which the columns are selected is the order in which they will appear in the table. The first column selected is the main subject of your table, the data that works as the core of the query (e.g. **Country** by sales). The following fields should be defined for each column:

* **Column**: the variable the user wants to be displayed.
* **Group by:** if selected, the column will be used to group by the data. Rows are grouped that have the same values into summary rows, like "customers grouped by country".
* **Column type**: refers to the data type and its related unit of measure. Depending on the data, it can be numeric, weight, power, distance, currency or percentage. For example, you would select "power" if you are measuring the total energy produced by each energy plant.
* **Create bin**: if the column has been selected for the Group by, and its type is numerical, the user has the possibility to [create bins.](/crystal-console/topics-configuration/configure/data-binning.md)
* **Aggregation**: if timestamp type is selected, you can decide the level of aggregation, e.g., daily or monthly.
* **Function**: the aggregation function that will be applied to the data that is not selected in the group by. If the column is not a numerical data type the function will be Identity.

Liked this one? Find out also[ how to build a single line chart!](/crystal-console/topics-configuration/visualizations/single-line.md)

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.igenius.ai/crystal-console/topics-configuration/visualizations/ranking-table.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
