If I have set a filter for a chart and then select...
# gooddata-platform
m
If I have set a filter for a chart and then select a conflicting filter in the dashboard, the chart usually shows no data. For example, if I have a country filter, and I set up the chart to only show UK but then I select France in the chart's dashboard, the chart will go blank. The opposite seems to be true for dates where the dashboard's date filter ignores the charts settings. Is there any way to make the date filter work like the others? Where if a user selects outside of the chart's selected date range, it would show nothing?
j
Hi Mitechel, We will need to discuss this further with our product team and will follow up with more details s soon as possible.
Could you possibly show a screenshot of what you are seeing with the date filters now, compared to what you would like to see?
m
Sure thing, when I build a chart, I've limited it to not go past the end of 2024. This is because the data on or before 2024 has one row per quarter, but 2025+ has one row per year. The chart is a quarterly chart, so the 2025 (annualized) data doesn't look right. However, the default date range for the dashboard is "all time", which overrides the filter in the screenshot and shows data from 2025+. While we are on the topic of date filters, it would be great if users could also remove them from the dashboard entirely without needing to modify the back-end code. Date filters don't always make sense in the dashboards that I build.
j
The dashboard filter replaces the date filter in insight if they both use the same date dataset. This feature is there so that you can develop the insight with limited amount of data in AD (in order not to see too many data points error) and then use it on dashboard without need to remove the filter from insight. I understand it is not expected behavior in your case. Possible workaround is to apply the filter on metric level (in AD or using MAQL). Such filter will be applied together with dashboard filter (logical AND).
m
Thanks @Jakub Sterba. I do understand that, but it's not how any other filter works
Let's say I have a filter on a field (previously I used the example of country). When I build the chart, I can limit the data to a select number of countries. If I include the same filter in the dashboard, it won't override the chart's filters.
So I guess my question is: why does the date filter operate differently from any other filter (and is there any way to change that)
j
Yes, you are right and I can understand it may be confusing that date filters behave differently. Let me discuss it with UX designers what to do about it. In the meanwhile you can use the workaround with filters on metric level. .
You can setup metric level date filter even in Analyze. There is setting which may need to be enabled to do it. See https://help.gooddata.com/doc/enterprise/en/workspace-and-user-administration/adminis[…]ce-objects/configure-various-features-via-platform-settings/
m
Ok, and one other way dates are different from other filters is that every dashboard is required to have one. It would be ideal if date filters worked like any other filter and could be added/removed. It's a seperate request, but related in the sense that these are the two ways that date filters are different from other filters. And good to know about the metric-level date filter. I'll give that a shot. Thanks so much!
p
πŸŽ‰ New note created.
πŸ™Œ 1
j
Please note that support of multiple date filters on dashboard is on roadmap of GD Cloud product and should be available there soon.
m
Got it, I believe I'm unfortunately on the platform product at the moment
Also, just enabled metric filters. This unfortunately doesn't work either because it overrides the dashboard date filter entirely. I still want users to be able to filter within the date range allowed in the chart's filters. I've got a few ideas for other workaround. Which again, is how field filters work.
j
The metric level filter shall not override dashboard filter. Are you sure the dashboard date filter is enabled using proper date dataset in dashboard widget configuration? Maybe it is disabled or different date dataset is selected.
m
Because there is a metric filter, the date is disabled as a control filter in the dashboard
j
This is strange. It probably means that some metric in the insight cannot be filtered by date.
m
No, because when I remove the metric date filters, it is enabled again
Screenshot from the exact same chart in the dashboard after I removed the metric filters
j
I can reproduce it. I will report it as bug. So the only option is to apply the filter in metric using MAQL now.
m
I ended up creating a separate text field (year) that I'm using as a filter. It's a good enough workaround for now.
And in reality, we would prefer to remove the date filter and just have a year filter for this dashboard because if someone were to select "last 7 days" (as a hypothetical), the dashboard would show no data because there is only one row/date per quarter. Which goes back to my initial request to be able to allow my users to remove the date filter.
j
In GD Cloud you can hide the date filter from the filter bar using UI. There exists some possibility for GD Platform using API (see https://gooddataconnect.slack.com/archives/C01USCF4S10/p1650323336631739?thread_ts=1650312959.777779&cid=C01USCF4S10)
m
Yeah, I've hidden the metadata object before, but it isn't something that's easy for me (or my users) to do, so I usually don't mention it as an option. Last I knew, migrating my account from platform to cloud was impossible. Since I already have a number of clients with charts/dashboards, it is tricky to migrate to cloud because I would have to ask all my clients to start over from scratch.
i
Hi, just note to your use case. On GD Platform, you don’t have to hide whole date filter. But you should be able to configure via dateFilterConfig visible presets for it, so in your case keep eg. only presets with quarter and year granularities https://help.gooddata.com/doc/enterprise/en/dashboards-and-insights/dashboards/filters-in-dashboards/customize-date-filters-in-dashboards/
m
Hi @Ivan Nejezchleb - Cool, thanks for this. I'll take a look. It would still be best if users could do this themselves in the UI, but this might be a good workaround in some cases.
Quick question - I believe there is a way to edit these settings in the browser. If I wanted to change the value here (in my browser), how would I do that? https://secure.gooddata.com/gdc/md/workspace_ID/objects/query?category=dateFilterConfig&limit=1
@Ivan Nejezchleb - Meant to tag you for the above post
πŸ‘€ 1
Never mind... I just did it via API. Seems to have worked. Thanks for the documentation, @Ivan Nejezchleb
πŸ‘ 1
i
When you query objects you are interested in, you need to pick one you want to modify and then open it via gray pages
Copy code
<https://DOMAIN/gdc/md/WORKSPACE_ID/obj/OBJ_ID>
this link is part of each MD object in
meta
section Then just add
?mode=edit
query param and you should be able to edit content of MD object. Something similar is described here for editing Theme MD object, point 3 https://help.gooddata.com/doc/enterprise/en/dashboards-and-insights/create-custom-themes/#CreateCustomThemes-Step4Editcustomthemes
@Mitchel Roling ^^
m
?mode=edit
is what I was looking for. Thanks! I'll have to write that one down @Ivan Nejezchleb