```Help please I'm trying to create a metric where...
# gd-beginners
t
Copy code
Help please
I'm trying to create a metric where the year I filter on the dashboard goes into the metric.

Example:
Filtering the dashboard on the year 2025 will return everything less than or equal to 2025 in the metric.
I tried this. Entering the year in the report returns the values, but when filtering a year, it doesn't return the value that is in the report.
y
Hi Tomas, Thanks for reaching out. Regarding your first question. It’s not possible to directly transfer a dashboard filter into a metric. If you need similar functionality, we recommend using a custom metric filter instead. You can set this filter directly within the metric definition, as described in the GoodData Platform documentation. This will ensure that the metric always applies the intended filter, regardless of dashboard-level settings. When you create or modify metrics using filters, you define how your data is used for the analysis. By applying filters at this stage, you exclude specific range of data from being used for computation. To create or modify a metric you need to have at least editor level access to a workspace. See User Roles. Let me know if this helps.
Hi Tomas, I see you are already using a custom metric to filter data. Can you confirm if this was working fine before, and if anything was changed. Lastly, are you able to share a direct link to the report so that we can impersonate and check what could be causing this issue. Feel free to share via dm
m
Hi Tomas, this direct approach will not work, because if the metric is filterable by the date on the dashboard, the filter is already autonatically applied to the metric (and is applied exactly - that is between the selected dates). And if you try to modify it in the metric, it won't work. For GD Platform (which you seem to be using based on the screenshots) there was a way how to achieve this however. You need to filter indirectly - by some other date by which the original metric is not filterable. And use an intermesiate meteic with BY ALL OTHER. Typically it was done by introducing a new "disconnected" date into the model - therefore this allroach is usually called "disconnected date dimension". Here are some older articles that describe this approach: https://help.gooddata.com/classic/en/data-integration/data-modeling-in-gooddata/data-modeling-using-the-cloudconnect-tool/data-modeling-tutorials-for-cloudconnect-and-apis/flexible-querying-with-a-disconnected-date-dimension/ and https://help.gooddata.com/classic/en/data-integration/data-modeling-in-gooddata/data-modeling-using-the-cloudconnect-tool/data-modeling-tutorials-for-cloudconnect-and-apis/painless-disconnected-date-dimensions/ Note that you do not need to use legacy CloudConnect to add the date dimension to your model, you can use the web modeller like for any other change.