Hello, not sure if this is the right channel or no...
# gooddata-platform
n
Hello, not sure if this is the right channel or not to ask this question (please let me know where to post if not here) Whenever i create reports for MoM and have them on a dashboard where the date range is anything except months (quarter or year), the "previous month" data is showing the previous month a year ago, and not the actual previous month within that period. I am not sure what I am doing wrong or how to play around with the filters within the report or dashboard to make the right numbers display Example (see screenshot) • September 2025: ◦ Actual month = 10 (right number) ◦ Previous Month = 9 (wrong number) -> it is displaying the month of September 2024 instead of August 2025 The same is happening on all of the report columns. The date range filter on the dashboard is "this year". The filters within the report (see second screenshot) is showing the right numbers. The report is taking the date range of the dashboard. What I would like the report to show is the MoM for this year and I am not able to do so... Any help or insight would be very much appreciated!
i
Hello Nelly, Thank you for the question. I believe this due to how date granularity works. If you can share the URL to the dashboard, I can help you with that. Thank you.
n
Unfortunately I cannot share the URL of this dashboard. Can you walk me through the fix? Thank you
j
The issue you’re experiencing—where the “Previous Month” value for September 2025 is showing as September 2024 instead of August 2025—stems from how GoodData’s time-over-time comparison and the FOR PREVIOUSPERIOD function interpret the date context and granularity in your dashboard and insights. Why This HappensFOR PREVIOUSPERIOD adapts to the smallest date granularity present in your report. If your insight is grouped by Month, it should shift by one month. However, when you apply a dashboard filter like “this year,” the data for the previous period (e.g., August 2025) may be excluded from the filter context, so the function cannot retrieve it. As a result, it may fall back to the previous year’s same month (September 2024) instead of the actual previous month (August 2025) [Community Slack Discussion]. • This is a known limitation: if your dashboard filter restricts the data to only the current year, the “previous period” for January 2025, for example, cannot find December 2024, so it returns no value or an incorrect one. The same logic applies for other months if the previous month is outside the filtered range [Community Slack Discussion]. How to Fix or Work Around 1. Widen the Dashboard Date Filter: 2. To ensure the “previous month” values are correct, your dashboard filter must include the previous period’s data. For example, if you want to see MoM for 2025, set the dashboard filter to include both 2024 and 2025. This way, August 2025 data is available for the September 2025 “previous month” calculation. 3. Use the FOR PREVIOUS Function: 4. If you want to always shift by a fixed number of periods regardless of the filter, use the FOR PREVIOUS function instead of FOR PREVIOUSPERIOD. For example: 5.
SELECT {metric} FOR PREVIOUS({label/Month/Year (Date)})
6. This will always shift by one month, even if the previous month is outside the current filter context [Community Slack Discussion]. 7. Be Aware of Filter Context: 8. The “previous period” logic is tightly coupled to the available data in the filter context. If the previous period is not present in the filtered data, the calculation cannot work as expected [GoodData Docs]. Summary • The “previous month” value is incorrect because the dashboard filter excludes the actual previous month. • To fix this, expand your dashboard filter to include the previous period, or use the FOR PREVIOUS function for a fixed shift. For any further assistance we would need to look into the workspace to see how you have defined the metric and how these objects align within the LDM.
👀 1
n
Thank you both for your help on this!