Is there a way to disable certain granularity of d...
# gooddata-cloud
r
Is there a way to disable certain granularity of data filtering for dates? We run on a line and rollup concept, and filtering by hour breaks when we base it off of rollup. So is this something we can modify?
k
Yes, you can disable certain granularities (such as hour or minute) in the date filter configuration for dashboards in GoodData Cloud. This is done using the
dateFilterConfig
metadata object, which allows you to specify exactly which granularities (e.g., day, month, year) are available to end users. To remove unwanted granularities, such as hour and minute, you need to edit the
relativeForm.granularities
section of your
dateFilterConfig
and include only the granularities you want to allow. For example, to allow only months and years:
Copy code
json "relativeForm": {   "granularities": [     "GDC.time.month",     "GDC.time.year"   ],   "localIdentifier": "relativeForm",   "name": "relativeForm",   "visible": true }
This configuration will hide the hour and minute options from the date filter UI, preventing users from selecting them and thus avoiding issues with your rollup logic. You can apply this configuration at the organization or workspace level via the API. For more details and examples, see the [Date Filter Documentation](https://www.gooddata.com/docs/gooddata-ui/latest/references/filters/date_filter/#how-to-modify-date-filters-in-dashboards) and the related [release notes](https://support.gooddata.com/hc/en-us/articles/37447045814675-GoodData-Cloud-January-16-2025). Additionally, you can also control available granularities in the Logical Data Model (LDM) by editing the date dimension and unchecking granularities you do not want to support. This can be done in the data modeler UI by selecting the date dimension, clicking "details," and adjusting the available granularities accordingly. This approach is confirmed by GoodData support staff and community discussions as well[How to Modify Date Filters in Dashboards](https://www.gooddata.com/docs/gooddata-ui/latest/references/filters/date_filter/#how-to-modify-date-filters-in-dashboards)[Community Slack](https://gooddataconnect.slack.com/archives/C04S1MSLEAW/p1712755018963459?thread_ts=1712755018.963459&cid=C04S1MSLEAW). In summary: Yes, you can disable specific date granularities (like hour) both via API configuration and in the LDM, ensuring your filters align with your rollup and line-level data structure.