Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dashboards with mixed datasources: Dashboard filter is populated with values from only one datasource #7741

Closed
hagen opened this issue May 28, 2018 · 6 comments

Comments

@hagen
Copy link

hagen commented May 28, 2018

  • Your browser and the version: Chrome 67
  • Your databases: MySQL compat.
  • Metabase version: 29.0
  • Metabase hosting environment: EB
  • Metabase internal database: PG

Repeat

  1. Create two datasources, D1 and D2. These two databases share a common table, Table
  2. Create two questions - they can be the same output, but Q1 uses Table from D1, and Q2 uses Table from D2
  3. Place the questions on a dashboard and add a Category filter. Wire the filter to the same field in both questions.
  4. The filter will alternate between showing values from Table in D1 and Table in D2. But not combine the values from both D1 and D2.

For example, D1 and D2 each have a table Locations with a field City.
D1 has Australian locations and D2 has New Zealand locations.
I create a Question on D1 which is a raw listing of entries in Location, and the same for D2.
I place both Questions on a Dashboard, add a filter wired to City on both.
On periodic reloads, the City Filter will show only cities in Australia or only cities in New Zealand.

Looking in the console of Chrome, I can see that on loading the dashboard, the filter values for City are fetched only for the City field of the second Card. And these are what's shown in the Filter drop-down.
If I remove the second card, the filter values come from the first card.

Other dashboard-with-multi-datasource issue: #7633

@salsakran
Copy link
Contributor

the expectation of the current version of the dashboard parameter mapping to a table column is that the same(ish) underying column is used by all the charts.

@hagen
Copy link
Author

hagen commented Jul 3, 2018

And that doesn't translate across databases/data sources?
i.e. database 1, table fruit, column name (text, category) - question is aggregation count() on column name
database 2, table fruit, column name (text, category) - question is aggregation count() on column name
If both questions are placed in a dashboard (card 1 and card 2), and a filter on name is used, wired to name in both cards, the filter shows only the fruit for one database/data source. Is that expected?

I mean, it's the same(ish) column, just different database...

@salsakran
Copy link
Contributor

So I'm pretty sure what we do under the hood is grab the mapped column of the first card in the dashboard and use that to power the list of valid values.

Will we do something more sophisticated in the future? Almost certainly, but that's how it works now.

@hagen
Copy link
Author

hagen commented Jul 3, 2018

Nawww, okay. It would appear that's what happens. It's pretty much always the values from just one of the cards.
Can I get a Feature Request label?! 🙏

@flamber
Copy link
Contributor

flamber commented Feb 25, 2019

This looks like a duplicate of #7168 - go and upvote by clicking 👍

@flamber
Copy link
Contributor

flamber commented May 28, 2020

Fixed in 0.35.0

@flamber flamber closed this as completed May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants