# Limit Values

The Limit Values feature literally limits/filters output of the categorical values by the conditions.

Limit Values is supported in the following chart types.

* Pivot (Row, Column)
* Summarize Table (Group By)
* Bar (X-Axis, Color, Repeat By)
* Line (Color, Repeat By)
* Area (Color, Repeat By)
* Scatter (With Aggregation) (X-Axis, Y-Axis, Color, Repeat By, Group By)
* Boxplot (X-Axis, Color, Repeat By)
* Violin (X-Axis, Color, Repeat By)
* Histogram (Color, Repeat By)
* Density Plot (Color, Repeat By)
* Error Bar (X-Axis, Color, Repeat By)
* Map - Extension (Color)

## Overview

Suppose you have a Bar chart with a lot of bars. You may want to reduce the number of bars because there are too many bars and hard to compare.

![](/files/-M4oNC3gG9gvEL-7g1oI)

You can definitely create a filter to reduce bars. But, it is not straightforward to define a filter based on the aggregated values (in this case, the size of bars) such as "Showing top 20 bars". Limit Values provides a set of ways to filter categories based on the aggregated values by category. For example, you can get the top 20 of bars by just setting "Top" with "20" results.

![](/files/-M4oNC3ibq4e6wwilUvP)

You can access Limit Value setting from the column menu.

![](/files/-M4oNC3kJQHsgDpFqgQ6)

## Types

There are 3 Limit Value types.

### Condition

You can define a condition against the aggregated values of each category to filter. For example, you can define "Countires that have sales amount more than 500,000.".

![](/files/-M4oNC3mh-vu13dSBpFU)

Following options are available.

* Based on: Values to compare. You can select a column that has values to compare and aggregation function. By default, it uses the same value column and its aggregation function used in the chart. You can also choose a different column and different aggregation function that is not even used in the chart.
* Set Position: See [below](#set-position) for detail.
* Operator: The Operator of the condition. Following operators are available.
  * equal to
  * not equal to
  * less than
  * less than or equal to
  * greater than
  * greater than or equal to
  * between
  * not between
* Value: Condition value

### Top

You can show only the number of categories that have the highest values. For example, you can set 20 to show top 20 countries.

![](/files/-M4oNC3ibq4e6wwilUvP)

Following options are available.

* Number of Results: Number of categories to show.
* Based on: Values to compare. You can select a column that has values to compare and aggregation function. By default, it uses the same value column and its aggregation function used in the chart. You can also choose a different column and different aggregation function that is not even used in the chart.

### Bottom

You can show only the number of categories that have the lowest values. For example, you can set 20 to show bottom 20 countries.

![](/files/-M4oNC3q4AvA124KWSs1)

Following options are available.

* Number of Results: Number of categories to show.
* Based on: Values to compare. You can select a column that has values to compare and aggregation function. By default, it uses the same value column and its aggregation function used in the chart. You can also choose a different column and different aggregation function that is not even used in the chart.

## Set Position

In the Limit setting for Color, you can set the position to compare and limit values. For example, if you have a Line chart showing Sales median values of each region and you want to show the top 5 region based on the last values.

![](/files/-M8awExbKfc308bg11uv)

You can do it by checking the "Set Position" checkbox, selecting "Last Value".

![](/files/-M8awExdc2MBOif95Y4Q)

You can also pick the top 5 region based on the first values.

![](/files/-M7xxLo3Q-KQtjfXy9Bd)

You can select by selecting "First Value".

![](/files/-M7xxLo9DXkYOqSLva2m)

The following positions are available.

* First Value
* Last Value


---

# 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.exploratory.io/visualization/features/limit.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.
