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:
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.
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.