I would like to check a custom date filter scenari...
# gooddata-cloud
k
I would like to check a custom date filter scenario in our visualization. It mainly involves using a custom date filter together with parameterization of the filter inside a metric. Below is the requirement and the scenario we are trying to achieve, please see attachment: We have a Date filter on top of the dashboard, and our fact table contains data up to the current day. We would like to keep a default relative filter of "Jan Current Year – Last Completed Month of Current Year." Currently, I do not see a built-in relative date option in GoodData that supports this exact requirement. Please look at the KPI visualization: "Revenue" and "Revenue %".Metric1 (Primary metric) should follow the dashboard date filter (Option 1). • Metric2 (Secondary metric) in the same KPI should automatically take the same relative period from the previous year. Example: If the Date filter = Jan 2026 – Feb 2026, then: • Metric1 → Jan 2026 – Feb 2026Metric2 → Jan 2025 – Feb 2025 In other BI tools, this type of behavior is usually achieved using parameters or parameterized filters. However, I do not see a similar filter-as-parameter concept in GoodData. This is an urgent requirement, so we would appreciate a quick turnaround with a scalable solution at the BI layer, rather than a hard-coded approach.
k
You can cover most of this with GoodData’s built‑in time‑over‑time features, but there are also some current limitations. 1. Default dashboard date filter: “Jan CY – last completed month CY” GoodData supports relative date filters (days/weeks/months/quarters/years) and lets you predefine presets such as “Last 7 days”, “Last 30 days”, etc., via
dateFilterConfig
at org/workspace level.[Date filter config] However, the sources do not describe a preset that means: > “From January 1 of the current year up to the last completed month of the current year” nor a way to express “last completed month” as a dynamic boundary. Relative filters are always defined as
from
/
to
offsets from today (e.g.
granularity: "GDC.time.month", from: 0, to: 0
= this month).[Filter visual components] So: • You can define relative presets like “This year”, “Last 12 months”, etc. • You cannot (per current docs) define a dynamic preset that always ends at “last completed month” while the data continues to load daily. Implementing that exact logic would need to be done in your data layer (e.g., a flag column) or via external logic that sets an absolute date range; it is not available as a built‑in relative preset today. 2. Metric1 vs Metric2 (same period vs same period previous year) This part is supported at the BI layer without hard‑coding specific dates. You can: • Let Metric1 follow the dashboard date filter (your standard revenue metric). • Define Metric2 as a derived measure “Same Period Previous Year” based on Metric1. In GoodData.UI, this is done with
newPopMeasure
(“period‑over‑period” measure):[Time over time]
Copy code
import { newMeasure, newPopMeasure } from "@gooddata/sdk-model";

// Master measure – follows dashboard date filter
const revenue = newMeasure("measure/revenue", m => m.alias("Revenue"));

// Derived measure – same period previous year
const revenueSPPY = newPopMeasure(
    revenue,
    "date.year.attribute.identifier",   // year attribute of your date dimension
    m => m.alias("Revenue LY")
);
Behavior: • If the dashboard date filter is Jan–Feb 2026, then: ◦
revenue
→ Jan–Feb 2026 ◦
revenueSPPY
→ Jan–Feb 2025 (same period previous year), automatically. • The period is always taken from the _global date filter_; you do not need to parameterize the filter inside the metric. In Analytical Designer / dashboards (no code), you get the same effect by enabling “Same period previous year” in the date filter’s Compare the period with option; GoodData automatically creates comparison metrics derived from the original metric.[Time‑over‑time in UI] 3. “Filter as parameter” / dynamic filter inside MAQL The knowledge sources explicitly state that: • MAQL metrics cannot access the dashboard date filter boundaries as variables (no
filter.start
/
filter.end
), and you cannot parameterize filters inside a metric in the way you describe.[Overlap dates] • MAQL also does not support generic “variables” or
CASE
logic to switch metric behavior based on a parameter value.[Variables not supported] So a true “filter‑as‑parameter” concept is not available today; the scalable pattern is: • Use derived measures (SPPY / Previous Period) for time‑over‑time. • Use multiple explicit metrics when you need different time shifts or behaviors. 4. Practical recommendation for your use case 1. Dashboard date filter ◦ Use the closest supported preset (e.g., “This year”) or a relative month range. ◦ If you must strictly end at “last completed month”, implement that boundary in your data source or via an external process that sets an absolute date range; GoodData does not provide a native relative option for this. 1. KPI with Metric1 & Metric2 ◦ Define your base revenue metric (Metric1). ◦ Define Metric2 as a Same Period Previous Year derived measure from Metric1 (via
newPopMeasure
or via the “Compare with → Same period previous year” option in the UI). ◦ Place both in the same KPI; they will always stay aligned with whatever period the dashboard date filter selects. If you share which deployment you use (GoodData Cloud vs. GoodData.UI app), I can outline the exact configuration steps (API vs. UI) for setting up the derived measure and the closest possible default date filter. 👍 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.
m
Hi Krishti, we have reviewed the response from our AI Assistant, and can confirm that the feedback is line with the current available options available to you *a*t the BI layer, rather than the hard-coded approach. But please feel free to follow-up if you need any further assistance, or if you would like to us mark this as Product Feedback on your behalf, or if perhaps our AI Assistant misunderstood your request.
k
This really does not help what we wanted. 1. We need the way to control "Date filer" in dashboard with default selection of Current Year start Month - Last completed Month of current year". Then 2. Various Metric like Metric with previous year same period. Metric with last 12 month period from max(selected date range in Date filter). All this can be achieved only if we have Dashboard Date filter act as variable and inserted as parameter in Metric which derive transformation in metric. We need this feature, and it will help GoodData to reach upto robust BI tool category.
j
Hello Krishti, thank you for the further details on this. We will certainly mark this down for product feedback and pass it to the product team. Please reach out to your account owner at GoodData should you need any follow up on the subject.