Hi all, I want to build a retention rate headline ...
# gooddata-cloud
a
Hi all, I want to build a retention rate headline metric in GoodData. We have two tables: • Center Contacts (one side) • Center Contact Memberships (many side) The goal is to apply filters at different time levels (weekly, monthly, and yearly) to measure retention. The challenge is that our customers have memberships with different renewal frequencies: • Some are weekly • Some are monthly • Most are yearly For example: • If a client has a weekly membership, the filter should work at the weekly level. • If a client has a monthly membership, the filter should work at the monthly level. • If a client has a yearly membership, the filter should apply correctly on a yearly basis. I’d like guidance on how we can structure the model or filters so that the retention metric supports all membership frequencies (weekly, monthly, yearly) in a single setup.
k
Building a retention rate metric in GoodData that dynamically adapts to different membership renewal frequencies (weekly, monthly, yearly) is a nuanced challenge. Based on the knowledge sources, here’s what is possible and what limitations exist: ### 1. Date Granularity in Filters GoodData allows you to configure date filters at various granularities (days, weeks, months, years) both at the dashboard and visualization level. You can customize which granularities are available using the
dateFilterConfig
metadata object, so you could expose only the relevant granularities to your users (e.g., week, month, year) [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). ### 2. Applying Filters to Metrics You can apply date filters to individual metrics within a visualization, allowing you to show, for example, retention rates for different periods side by side. However, each metric instance can only have one date filter applied at a time, and the filter applies uniformly to all data in that metric instance [Filter Metrics in a Visualization by Date](https://www.gooddata.com/docs/cloud/create-visualizations/filter/filter-measures-by-date/). ### 3. Conditional Filtering Based on Attribute Values GoodData does not natively support conditional filtering where the filter granularity changes dynamically based on an attribute value (e.g., membership type). Filters are applied uniformly to the data in a metric or visualization. This means you cannot, in a single metric, automatically apply a weekly filter for weekly memberships, a monthly filter for monthly memberships, and so on, based on the membership type. This limitation is confirmed in community discussions: “filters are applied to the table uniformly, e.g., you cannot say 'apply this filter only for rows where X is true, and ignore it when Y is true.'” [Community Slack Discussion](https://gooddataconnect.slack.com/archives/C04S1MSLEAW/p1749148408352749?thread_ts=1749148408.352749&cid=C04S1MSLEAW). ### 4. Workarounds - Separate Metrics/Insights: You can create separate metrics for each membership frequency, each with its own date filter (weekly, monthly, yearly), and display them side by side in a dashboard. This approach is manual but aligns with platform capabilities. - Custom ETL/Preprocessing: If you need a single metric that adapts granularity based on membership type, you would need to preprocess your data (outside GoodData) to align the retention calculation period with the membership frequency, and then bring that result into GoodData as a fact. ### 5. Model Structure - Ensure your data model includes a clear relationship between memberships and their frequency (e.g., a “Membership Frequency” attribute). - Expose the relevant date dimensions (week, month, year) in your Logical Data Model (LDM) so you can filter and aggregate at the required levels [Sort Labels and Date Datasets](https://gooddataconnect.slack.com/archives/C04S1MSLEAW/p1730847231576189?thread_ts=1730847231.576189&cid=C04S1MSLEAW). --- Summary: GoodData supports flexible date filtering and metric-level filters, but does not support dynamic, row-level conditional filtering based on attribute values within a single metric. The recommended approach is to create separate metrics or insights for each membership frequency, each with its appropriate date granularity filter, and present them together in your dashboard. If you need further automation, consider preprocessing your data to calculate retention at the correct frequency before loading it into GoodData. If you need more technical details on configuring date filters or structuring your LDM, let me know!