Beastmode For Prior Month, Current Month, Next Month, Month +2

I currently have 4 different cards that show me the prior month forecast by week, current month forecast by week, next month forecast by week and 2 month ahead forecast by week. All 4 cards show me the current week price forecast, what the price forecast was last week, and the variance between what showed last week and this week. I would like to combine all of those cards into one but I'm having trouble figure out a beastmode that would filter the dates properly for me. I currently just filter the dates on each card to show what date range I'm looking for.
My thought is I'll need to create 12 different Beastmodes to filter for all of the data/dates I need:
Last Week:
-Prior Month
-Current Month
-Next Month
-Month +2
Current Week:
-Prior Month
-Current Month
-Next Month
-Month +2
Variance Between last week and this week:
-Prior month
-Current month
-Next month
-Month +2
Answers
-
Oh boy. I've been struggling with this too for a while. There's a few really good write ups to get you started, so I won't claim to know the answer but rather point to those who do:
https://community-forums.domo.com/main/discussion/53481/a-more-flexible-way-to-do-period-over-period-comparisons#latest
Your thought process is correct, but it'll be more scalable and responsible to join on a Date Dimensions table and then have restructured WIDE data to work with. Both the above will go into detail on this. I'm afraid there isn't an easy answer though.
God Speed 🫡
✅Did this solve your problem? Accept it as a solution!
❤️Did you love this answer? Mark it as "Awesome"!
👍Do you agree with this process? Click "Agree"!
0 -
forecast_date
run_date
forecast_value
2025-07-15
2025-06-03
$45.00
2025-07-15
2025-05-27
$43.50
Month Category (which month)
CASE
WHEN MONTH(`forecast_date`) = MONTH(DATE_SUB(CURRENT_DATE(), INTERVAL 1 MONTH))
AND YEAR(`forecast_date`) = YEAR(DATE_SUB(CURRENT_DATE(), INTERVAL 1 MONTH)) THEN 'Prior Month'
WHEN MONTH(`forecast_date`) = MONTH(CURRENT_DATE())
AND YEAR(`forecast_date`) = YEAR(CURRENT_DATE()) THEN 'Current Month'
WHEN MONTH(`forecast_date`) = MONTH(DATE_ADD(CURRENT_DATE(), INTERVAL 1 MONTH))
AND YEAR(`forecast_date`) = YEAR(DATE_ADD(CURRENT_DATE(), INTERVAL 1 MONTH)) THEN 'Next Month'
WHEN MONTH(`forecast_date`) = MONTH(DATE_ADD(CURRENT_DATE(), INTERVAL 2 MONTH))
AND YEAR(`forecast_date`) = YEAR(DATE_ADD(CURRENT_DATE(), INTERVAL 2 MONTH)) THEN 'Month +2'
ELSE 'Other'
ENDWeek Category (forecast was run this week or last week)
CASE
WHEN WEEK(`run_date`) = WEEK(CURRENT_DATE()) AND YEAR(`run_date`) = YEAR(CURRENT_DATE()) THEN 'Current Week'
WHEN WEEK(`run_date`) = WEEK(DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY))
AND YEAR(`run_date`) = YEAR(DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY)) THEN 'Last Week'
ELSE 'Other'
ENDVariance
`this_week_forecast` - `last_week_forecast`
And a pivot card to produce an output
forecast_date
Month Category
Current Week Forecast
Last Week Forecast
Variance
2025-07-15
Next Month
$45.00
$43.50
$1.50
** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **1 -
thank you for the help everyone!
0
Categories
- All Categories
- Product Ideas
- 2.1K Ideas Exchange
- Connect
- 1.3K Connectors
- 309 Workbench
- 7 Cloud Amplifier
- 10 Federated
- Transform
- 663 Datasets
- 119 SQL DataFlows
- 2.3K Magic ETL
- 823 Beast Mode
- Visualize
- 2.6K Charting
- 86 App Studio
- 46 Variables
- Automate
- 193 Apps
- 483 APIs & Domo Developer
- 87 Workflows
- 23 Code Engine
- AI and Machine Learning
- 23 AI Chat
- 4 AI Projects and Models
- 18 Jupyter Workspaces
- Distribute
- 117 Domo Everywhere
- 283 Scheduled Reports
- 11 Software Integrations
- Manage
- 143 Governance & Security
- 11 Domo Community Gallery
- 49 Product Releases
- 13 Domo University
- Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 116 Community Announcements
- 5K Archive