I have run into an issue with Dashboard filters in v0.33.2.
For some reason, Metabase shows “no available” fields when I try to assign a Dashboard filter to a Simple question based on a MySQL view.
At the same time, Dashboard filters work correctly with a Question based on the MySQL table.
- MySQL View-based Simple question built with Metabase builder (no custom code):
=> Cannot use its fields with a Dashboard filter:
- MySQL Table-based Simple question built with Metabase builder (no custom code):
=> Can use its fields on with a Dashboard filter
I’ve checked it for Metabase 0.32.10, it and handles the same view-based Question properly:
I’m not sure how, but notice the order of the Filter and Summarize sections between the working and non-working question.
Try re-doing the non-working question and first define the Filter and then Summarize.
If you can provide steps-to-reproduce for how the order was set to Summarize and then Filter, then please provide those steps, since that seems like a bug.
Apparently, you were right:
- Custom Question
- Choose table
- Set up Summarize metric and Grouping field
- Click on the “Visualize” button
- Click on the “Show editor” button
=> “Filter” section is gone
- Click on the “Filter” button
=> the “Filter” section is added at the bottom, after the “Summarize” section.
- Save the Question, add it to a Dashboard, and then its fields become unavailable for the Dashboard filters (as on the screenshot above)
@flamber, actually, I’ve noticed that setting up a Metric filter also makes it impossible to use Dashboard filters on the Question. Even if the operations order is the following:
- Filter by table fields
- Filter by metric
It seems to me like a bug as well, please have a look.
Great. Thanks for the steps-to-reproduce!
When using the Editor, it can quickly become tricky, since you can do table joins and havings.
Notice the Filter-icon right below the Data-section - that’s the filter you’re interested in.
If you use the bottom filter, then it will make a filter on the summarized data - and to that, it’s doing a sub-query, which is messing with your dashboard filters.
@maz Very similar to what I reported in the previews. Not sure if something needs to be explained differently or documentation should cover this?