cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Filter in DBX dashboards

nehaa
New Contributor II

How to add a column from Table1 as a filter to Table2 (Also called as on-click action filter) in databricks Dashboards?
Both the tables are getting data through sql query 

1 REPLY 1

Walter_C
Honored Contributor

To add a column from Table1 as a filter to Table2 in Databricks Dashboards, you can use the dashboard parameters feature. Here are the steps:

  1. Create a visualization for each of your SQL queries. You can do this by clicking the '+' next to the Results tab and selecting Visualization. Save your visualizations.

  2. Create a dashboard using these visualizations. You can add a second widget to the dashboard from the Add drop-down list and select the appropriate query.

  3. Add a dashboard parameter to each query. This is done by adding a WHERE clause to your SQL query to filter the query by the desired column. For example, if you want to filter by a column named 'column1' from Table1, you would add this clause before the GROUP BY clause: WHERE column1 IN ({{ column1 }}).

  4. Update the dashboard to use the dashboard parameter. Open your dashboard, and for each visualization, click the kebab menu and then click Edit. In the Parameters section, click the pencil icon for the Widget parameter in the Value field. Change the Source to New dashboard parameter.

  5. Verify that 'column1' is selected as the Key value. Click OK and then click Save. The widget parameter for the visualization should no longer appear.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group