Hi, I was wondering if there is anyway to customi...
# gooddata-cloud
c
Hi, I was wondering if there is anyway to customise the date filter on the dashboard so that it only allows users to look at the last 3 calendar months?
k
Yes. You can restrict the dashboard date filter so users effectively only work with “last 3 months” by configuring the
dateFilterConfig
metadata object. There are two main levers: 1. Limit available granularities (e.g., only months) 2. Limit available presets (e.g., only “Last 3 months”) 1. Create / update dateFilterConfig Configure it at org or workspace level: •
POST /api/v1/entities/organizationSettings
• or
POST /api/v1/entities/workspaces/{workspaceId}/workspaceSettings
[Date filter config] Example payload skeleton:
Copy code
{
  "data": {
    "id": "dateFilterConfig",
    "type": "workspaceSetting",
    "attributes": {
      "content": {
        "config": {
          "absoluteForm": {
            "localIdentifier": "absoluteForm",
            "name": "",
            "visible": false
          },
          "allTime": {
            "localIdentifier": "allTime",
            "name": "All time",
            "visible": false
          },
          "relativeForm": {
            "granularities": [
              "GDC.time.month"
            ],
            "localIdentifier": "relativeForm",
            "name": "",
            "visible": true
          },
          "relativePresets": [
            {
              "from": -2,
              "to": 0,
              "granularity": "GDC.time.month",
              "localIdentifier": "last_3_months",
              "name": "Last 3 months",
              "visible": true
            }
          ],
          "selectedOption": "last_3_months"
        }
      },
      "type": "DATE_FILTER_CONFIG"
    }
  }
}
What this does: • Hides All time and Static period (absoluteForm) by setting
visible: false
. [Date filter config] • Keeps only month granularity in
relativeForm.granularities
. • Defines a single relative preset:
from: -2, to: 0
with
granularity: "GDC.time.month"
→ “Last 3 months” (current month + 2 previous). [Filter visual components] Users will then only see the monthly relative filter with the “Last 3 months” preset (and no other periods), which effectively constrains them to that range. If you need a slightly different behavior (e.g., last 3 completed months, or to keep other presets visible), you can adjust the `from`/`to` and the
relativePresets
list accordingly. 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups. 👀 Our Support team monitors all messages and will jump in if needed.
s
Hi Chris. Thank you for reaching out. Please follow the instruction from our AI agent, it is correct.
c
Thank you I will test that out
👍 1