---
description: Here's how to enable drilldowns for bar charts
---

# Bar Charts

### Enable Drilldowns

The first step to setting up the drilldown is to enable it in the bar chart itself. In the config you can enable category selection in the drilldown menu. Select the option to turn on the drilldown.

![](https://2280154036-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MQY7AWezpSx_iDLogun%2Fuploads%2FUTFoaakhoHTJfKauZsef%2FScreen%20Shot%202022-05-27%20at%205.35.34%20PM.png?alt=media\&token=2551e408-d605-4ca7-9777-84ef6bca9fff)

### Variables

When drilldown is turned on for that bar chart, a variable will be created for that chart. The underlying value will be assigned to a variable with the format `chart_id.category` as shown below.

You can then use the new variable as you would any other variable generated from a filter or dropdown in the SQL editor or in the filter config for individual charts.&#x20;

For more information on how to use variables, you can reference the docs [here](../variables/using-variables).&#x20;

![](https://2280154036-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MQY7AWezpSx_iDLogun%2Fuploads%2FBQjjEMafMhQjjhUNElFZ%2FScreen%20Shot%202022-05-27%20at%205.36.47%20PM.png?alt=media\&token=7606a85b-4e21-4e18-b448-e5de817a902e)

If the bar chart is grouped then two variables will be set once a value is selected like below.

![](https://2280154036-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MQY7AWezpSx_iDLogun%2Fuploads%2FZ2D5Va18eEvJqSai95dJ%2FScreen%20Shot%202022-05-27%20at%205.40.31%20PM.png?alt=media\&token=09a56b70-bba8-4b1b-b2c4-79ef70fbefd3)
