Saif Hasan
05/07/2026, 11:05 AMkapa.ai
05/07/2026, 11:06 AMMAX(date) or MIN(date) on their own return a numeric internal representation (e.g., 2022 instead of a readable date), and there is currently no supported date formatting for metric outputs. [Community Slack]
Your 3-step approach in MAQL Steps 1 and 2 are achievable in MAQL using DATETIME_DIFF and `AVG`:
SELECT AVG(
SELECT DATETIME_DIFF({label/start_date.day}, {label/end_date.day}, DAY)
BY {dataset/your_dataset}
)
This gives you the average number of days between start and end dates as a number. [DATETIME_DIFF docs]
Step 3 (adding the result back to get a date) is where MAQL hits its wall. While DATETIME_ADD exists, it is used in WHERE clauses for filtering — not to produce a date as a metric output value. The result of any metric expression will still be a number, not a displayable date. [DATETIME_ADD docs]
Recommended alternatives 1. Handle it upstream in your data source (recommended): Compute the average end date as a proper date column in your ETL/SQL layer, then expose it as a date dimension or attribute in GoodData's logical data model. This is the most reliable approach and avoids the MAQL limitation entirely. [Community Slack]
2. Display the numeric result with formatting: You can display the average day-count metric and use metric formatting to make it more readable, but you cannot render it as a mm/dd/yyyy date string — that formatting is not currently supported for metrics. [Community Slack]
3. Dashboard plugin (advanced): If you're embedding dashboards, a plugin can perform more complex date logic dynamically and display the result in a text/KPI widget. [Community Slack]
Summary The knowledge sources do not mention a "computed attribute" construct that would solve this within GoodData itself, so the upstream data source transformation is the most robust path for your use case. 👍 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., with interactive elements