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: 

Dashboard use 'Multiple values' in underlying query

AnatolBeck
New Contributor II

Currently, it appears that the Dashboards functionality does not support linking a 'Multiple Values' widget to a query parameter, nor does it allow the creation of a line plot with multiple lines.

We are developing a dashboard where users need to visualize power over time for specific units, with the ability to select these units via a multi-value dropdown widget. The expectation is for the plot to dynamically add or remove lines based on the selected units.

At present, I cannot find an option to generate multi-line plots or to connect a multi-value parameter to a query—only single-value parameters seem to be supported.

Could you clarify if there are plans to introduce this feature in the near future? Alternatively, is there a specific reason why multi-value queries and multi-line plots are not currently available?

2 REPLIES 2

iamtanishk
New Contributor II

Hi there,

You've raised an important point about the current limitations in Databricks dashboards when it comes to multi-value parameter widgets and multi-line plots.

As of now, the Databricks dashboarding functionality does indeed have some limitations when handling multi-value dropdowns in queries and dynamically generating multi-line plots based on multiple selected values. This limitation can be a challenge for use cases like yours where users need to compare data for multiple units over time on the same plot.

Workarounds:
Although multi-value parameters aren't directly supported, there are a few approaches you could consider to get closer to the desired functionality:

  1. Custom Notebook Visualizations: You can use Databricks notebooks with matplotlib, plotly, or seaborn to create custom multi-line plots. These libraries handle multi-line plots well, and you can set up a dbutils.widgets.multiselect to let users select multiple units. By dynamically generating the plot based on the widget input, this approach gives you more control over both the query and the visualization.

  2. Query Adjustments: You can handle multi-value selection logic within SQL queries in your notebook, using IN conditions to filter based on multiple selected units. Then, plot the results using Python/R visualization libraries within the notebook itself, if the dashboard interface isn’t flexible enough.

Future Plans:
Regarding future support for this feature, it’s best to keep an eye on the Databricks release notes and the product roadmap for any updates. You can also submit a feature request to Databricks Product Management if this is a critical use case for you, as they actively consider feedback from the community to prioritize new features.

I hope this helps.

Best,
Tanishk Chaturvedi,
Senior Data Engineer.

AnatolBeck
New Contributor II

Hello,

thank you for your reply.

Notebooks are not really a workaround for me here but thank you for the walk through.

I think this feature is very important so I hope this reaches your backlog somehow. As this is something a Grafana for example is able to do out of the box. So this is not really something that should need a request for prioritization but should rather be a basic feature of dashboards.

I have not the time to contact and engage with your product management to be honest besides I don't know how to reach them.

Again thank you and best regards!

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