How do we achieve the following behavior? (see att...
# gooddata-cloud
k
How do we achieve the following behavior? (see attached image) When a Date Range is selected on the dashboard, the line chart should always display 12 months of data ending at the max month in the selected range. Examples: • If the filter is Jan–Feb 2026, the line chart should show Mar 2025 → Feb 2026 • If the filter is Nov 2025–Jan 2026, the line chart should show Feb 2025 → Jan 2026
k
This is a nuanced requirement, and based on the available knowledge sources, I need to be transparent about what GoodData currently supports and where the limitations lie. What You're Trying to Achieve You want the line chart to always show a rolling 12-month window ending at the last month of the dashboard date filter — so the chart's range is dynamically derived from the filter's upper boundary, not fixed. Current GoodData Limitations Unfortunately, this specific behavior runs into two known platform limitations: 1. No access to filter boundaries inside MAQL MAQL metrics cannot access the dashboard date filter boundaries as variables (e.g.,
filter.end
). You cannot dynamically compute "the last month of the selected range" and use it as a parameter inside a metric or visualization. [Overlap dates] 2. Rolling-window metrics are constrained by active filters A rolling-window metric (e.g., a 12-month running total/window) only sees rows that pass the active filters. If the dashboard filter is set to "Jan–Feb 2026", the metric cannot reach back to Mar 2025 — the prior months are excluded by the filter itself. [Rolling window] 3. No dynamic x-axis granularity adjustment GoodData does not automatically adjust the time granularity of a chart based on the selected date range. [Dynamic granularity] What You Can Do Instead The knowledge sources suggest the following workarounds: • Relax the dashboard date filter: Instead of filtering to "Jan–Feb 2026", set the filter to cover the full 12-month window (e.g., "Last 12 months"). The KPI comparisons (like "9.1% vs LY" shown in your screenshot) can still be achieved using derived measures (Same Period Previous Year via
newPopMeasure
or the UI's "Compare with → Same period previous year" option), which automatically align with whatever period the dashboard filter selects. [Time‑over‑time in UI] • Precompute the logic at the data source level: Add a column or flag in your database that marks whether a record falls within the desired 12-month rolling window ending at a given period. GoodData's date filters are not designed for this level of custom boundary logic natively. [Slack community] • Submit as product feedback: This type of dynamic window behavior (chart range driven by filter's upper boundary) has been flagged by other community members as a gap, and GoodData support has been logging similar requests as product feedback for the Product team. [Dynamic granularity] In summary, the exact behavior you're describing — where the line chart's 12-month window dynamically shifts to end at the filter's max month — is not natively supported today. The most practical path is either to restructure the filter/data approach or raise it as a product feedback item with GoodData. 👍 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.
k
Need some solution please.
Can anyone look into this please?
j
Hi Krishti, as the previous comment states, it is not natively supported. Therefore, we can offer this as product feedback on your behalf. If a custom solution is required, I would suggest to reach out to your account owner to engage in discussions using professional services.
k
Please submit a product feedback, there must be parameter feature or filter variable available that can be used in MAQL.
j
You’re right that in some BI tools you can reference a filter boundary directly (for example something like
filter.max_date
). In GoodData Cloud, dashboard filters are not exposed as variables or parameters inside MAQL, so unfortunately there isn’t a way to directly reference “the max selected month” from the date range filter in a metric. That said, there may be a practical workaround that can achieve the behavior you want. The key idea is to separate the date used for filtering from the date used on the chart axis, so the visualization can still display earlier months even when the dashboard filter is narrow. STEPS: 1️⃣ Keep your existing date attribute for the dashboard filter This is the date attribute your Date Range filter controls (for example
Order Date
). Users select:
Copy code
Jan–Feb 2026
2️⃣ Add a second month attribute for the chart axis Create a second attribute in your dataset or date dimension such as:
Copy code
Chart Month
This attribute represents the month used on the x-axis of the line chart. Importantly: • Dashboard date filters should NOT be connected to this attribute • It is only used for the visualization axis 3️⃣ Use a rolling-12-month metric Create a metric that calculates the value over the last 12 months relative to each month on the axis. Example conceptually:
Copy code
SELECT SUM({fact})
WHERE {Chart Month} BETWEEN CURRENT_DATE - 12 MONTHS AND CURRENT_DATE
Please note that the exact implementation depends on how the date dimension is modeled. You could also try this and see if this fits your use case.
k
Hi Joseph, I have done this with Current Month -12. But that fix x axis with showing 12 month back with respect to current month only. What we wanted to show rolling 12 month back on grph with respect to min(dashbooard.date range filter). Examples: • If the filter is Jan 2026–Feb 2026, the line chart should show Mar 2025 → Feb 2026 • If the filter is Nov 2025–Jan 2026, the line chart should show Feb 2025 → Jan 2026 Hope I am clear.
j
Understood. I will submit this for product feedback on your behalf.
👍 1
k
Yes please do.