> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usedatabrain.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create/Modify Dashboard Filter

> Dashboard filters allow for more precise data viewing and analysis within your dashboard.

> Take control of your data exploration with Databrain's powerful dashboard filters. Whether you
> need simple dropdowns, dynamic ranges, or complex SQL-based filtering, our comprehensive
> filter system puts precision data analysis at your fingertips. This guide walks you through creating
> and customizing filters that transform how you interact with your dashboards.

1. **Add Dashboard Filters:**

* Click the "+" icon to add a dashboard filter.
* Choose filter type from the dropdown menu:
  * **Select**: Creates filters at the top of your dashboard
  * **Switch Select**: Creates compact dropdown filters with labels in the left sidebar **"Filters"** panel
  * **Other**: Creates additional filters in the left sidebar **"Filters"** panel

<Frame>
  <img src="https://mintcdn.com/databrainlabs-bef6850a/NqG3dHFfS2Md95Zh/images/guides/image-dashboard-settings.png?fit=max&auto=format&n=NqG3dHFfS2Md95Zh&q=85&s=d5c99674bcff3c6a510ecc763e663def" alt="" width="1120" height="523" data-path="images/guides/image-dashboard-settings.png" />
</Frame>

2. **Configuring a Filter:**

Choose the desired type of filter from the **"Option Type"** radio buttons:

* **Method 1: Auto Filter Type**\
  Automatically filters based on existing database columns - best for straightforward data filtering without customization.
* **Method 2: Range Filter Type**\
  Creates min-max sliding selectors - perfect for numerical data like prices, ages, or quantities.
* **Method 3: Date Filter Type**\
  Handles all time-based filtering - ideal for selecting date ranges and time periods.
* **Method 4: Manual Filter Type**\
  Uses predefined static options - great when you need a fixed list of specific choices.
* **Method 5: Custom Filter Type**\
  Enables complex SQL-based filtering - essential when you need custom logic or calculations in your filters.

**Common Customization Options**

* **Filter Variant**: Choose between single select, multi-select, or search options
* **Choose a Unique Label Column**: Configure descriptive labels for filter values
* **Show Client Scoped Filter Options**: Tailor filter options based on client context
* **Auto Select Default Value**: Set automatic default values based on datatype
* **Depend On**: Establish dependencies between related filters

<Frame>
  <img src="https://mintcdn.com/databrainlabs-bef6850a/NqG3dHFfS2Md95Zh/images/guides/image-dashboard-settings2.webp?fit=max&auto=format&n=NqG3dHFfS2Md95Zh&q=85&s=d3fd3f0d4e7c7658a42b2983ebd416c9" alt="" width="688" height="387" data-path="images/guides/image-dashboard-settings2.webp" />
</Frame>

**Method 1: Auto Filter Type**

* **Use:** Automatically filters based on existing database columns - best for straightforward data filtering without customization.
* Set option type as **"Auto"** for automatic filtering.
* Then, choose the required variant from the **"Filter Variant"** radio buttons.
  * Single-Select: For single value selection
  * Multi-Select: For multiple value selection
  * Search: To search a value
* Toggle over the **"Advanced Options"** to make it interactable.
* Finally, click on **"Next"**.

<Frame>
  <img src="https://mintcdn.com/databrainlabs-bef6850a/NqG3dHFfS2Md95Zh/images/guides/image-dashboard-settings3.png?fit=max&auto=format&n=NqG3dHFfS2Md95Zh&q=85&s=e957bf4b94baf678a265431beeb79006" alt="" width="688" height="321" data-path="images/guides/image-dashboard-settings3.png" />
</Frame>

**Method 2: Range Filter Type**

* Set option type as **"Range"** to select numeric ranges.
* Then, toggle over the **"Advanced Options"** to make it interactable.
* Finally, click on **"Next"**.

<Frame>
  <img src="https://mintcdn.com/databrainlabs-bef6850a/NqG3dHFfS2Md95Zh/images/guides/image-dashboard-settings4.png?fit=max&auto=format&n=NqG3dHFfS2Md95Zh&q=85&s=f4a0e287536dab2441b4f106f86c1866" alt="" width="1120" height="522" data-path="images/guides/image-dashboard-settings4.png" />
</Frame>

**Method 3: Date Filter Type**

* Set option type as **"Date"** for date-based filtering.
* Choose the suitable option from **"Date Type"** buttons.
  * **Date Selection**: Select a manual date range with **"Enable Restrictions"** option
  * **Present Date**: Specify a Time Interval and Time Grain to quickly set predefined date ranges
* Then, toggle over the **"Advanced Options"** to make it interactable.
* Finally, click on **"Next"**.

<Frame>
  <img src="https://mintcdn.com/databrainlabs-bef6850a/NqG3dHFfS2Md95Zh/images/guides/image-dashboard-settings5.webp?fit=max&auto=format&n=NqG3dHFfS2Md95Zh&q=85&s=ea0cf4eec8e782e159f6c4a324b51070" alt="" width="688" height="321" data-path="images/guides/image-dashboard-settings5.webp" />
</Frame>

**Method 4: Manual Filter Type**

* Set option type as **"Manual"**.
* Then, choose the required variant from the **"Filter Variant"** radio buttons.
  * Single-Select: For single value selection
  * Multi-Select: For multiple value selection
  * Search: To search a value
* Then, toggle over the **"Advanced Options"** to make it interactable.
* Finally, click on **"Next"**.

<Frame>
  <img src="https://mintcdn.com/databrainlabs-bef6850a/NqG3dHFfS2Md95Zh/images/guides/image-dashboard-settings6.png?fit=max&auto=format&n=NqG3dHFfS2Md95Zh&q=85&s=691193a4de2bb06872c16b880a380a44" alt="" width="1120" height="521" data-path="images/guides/image-dashboard-settings6.png" />
</Frame>

**Method 5: Custom Filter Type**

* Set option type as **"Custom"**.
* Then, choose the required variant from the **"Filter Variant"** radio buttons.
  * Single-Select: For single value selection
  * Multi-Select: For multiple value selection
  * Search: To search a value
* Use SQL Editor to write queries and specify Column Name and label
* Then, toggle over the **"Advanced Options"** to make it interactable.
* Set dependencies if needed through **"Depend On"** section.
* Finally, click on **"Next"**.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/databrainlabs-bef6850a/images/guides/image-dashboard-settings7.png" alt="" />
</Frame>

3. **Apply on and Variable Filter:**

* **Apply on:**
  * Choose the dataset and column for which the filter should be applied.
  * In the **"Restrict Metrics"** drop-down, you can select the columns for which the filter will be restricted.
  * To use custom sql, please refer the below link:

<Info />

* **Variable Filter:**
  * Use the variable filter to convert data into lowercase and assign a variable name, e.g. `{{global_value}}`, for future reference in SQL queries.
  * Copy the assigned variable `{{global_value}}` to use in your custom SQL query.
  * Refer to the link below for a detailed guide on using the variable filter.
* Finally, click on **"Save"** to create the filter.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/databrainlabs-bef6850a/images/guides/image-dashboard-settings8.png" alt="" />
</Frame>

For a more detailed guide on Variable Apply On, kindly refer the below link:

<Info />

4. **Modify Dashboard Filter:**

* To modify the configurations of any dashboard filter, click on the **"Edit"** button.
* To remove a filter, select **"Delete"** filter.

<Frame>
  <img src="https://mintcdn.com/databrainlabs-bef6850a/NqG3dHFfS2Md95Zh/images/guides/image-dashboard-settings9.png?fit=max&auto=format&n=NqG3dHFfS2Md95Zh&q=85&s=83dee98a2c2e1cbeeec711a450ce7495" alt="" width="1120" height="336" data-path="images/guides/image-dashboard-settings9.png" />
</Frame>
