Current Year, Prior Year, and Budget on Same Card
Hello,
I'm trying to build a car with Budget, Current Year Actuals, and Prior Year Actuals. I created the view I wanted (see attachment), however, I had to use BeastMode. I can't filter easily with the way I had to write the BeastMode.
PROBLEM: Create a card with CY Actuals, PY Actuals, and Budget on one card with the ability to adjust Page Filters and have the card update.
Note: I've tried the Period over Period chart type without success. I have Budget as part of the underlying data, but can't get it to show up. There is not an option for "Series" in the Period over Period chart type.
BEASTMODE:
CASE
when `Order Amount (Global)` and YEAR(`Date`) = YEAR(CURRENT_DATE()) then 'CY Actuals'
when `Order Amount (Global)` and Year(`Date`) = YEAR(CURRENT_DATE())-1 then 'PY Actuals'
when `Orders Budget (Global)` and YEAR(`Date`) = YEAR(CURRENT_DATE()) then 'Budget'
Else '2+ Years'
end
Comments
-
Hi @user054650
@jaeW_at_Onyx has had several writeups about this specific problem but it boils down to you want a new table which has an actual date, a report date and an offset/period type. (Read more about it here: https://dojo.domo.com/t5/Beast-Mode-ETL-Dataflow/Calculating-index-vs-Year-Ago/m-p/48952)
So you'd have
| Actual | Report | Offset |
| 1/1/2020 | 1/1/2020 | Current Year |
| 1/2/2020 | 1/2/2020 | Current Year |
| 1/3/2020 | 1/3/2020 | Current Year |
...
| 1/1/2020 | 1/1/2019 | Prior Year |
| 1/2/2020 | 1/2/2019 | Prior Year |
| 1/3/2020 | 1/3/2019 | Prior Year |
In a separate table and join to this table so you can filter / beast mode based on the offset type. You'd want to utilize three separate beast modes as well instead of a single beast mode.
As for your card you can utilize a Line Bar chart to get what you're looking for.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
If possible, could you share an example of a card that used this solution?
Thank you!
0 -
https://www.youtube.com/watch?v=CDKNOmKClms
Here you go @user054650 . If you have further questions, check out some of the videos on my channel!
If you're looking for one on one support, I am available at a reasonable rate to provide consulting services, reach out to me at jae@onyxreporting.com.
BTW @GrantSmith , in your solution you put the offset in the Report Date column. The offset should go into the Activity Date.
Jae Wilson
Check out my 🎥 Domo Training YouTube Channel 👨💻
**Say "Thanks" by clicking the ❤️ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"2
Categories
- All Categories
- 1.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 292 Workbench
- 4 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 95 SQL DataFlows
- 601 Datasets
- 2.1K Magic ETL
- 3.7K Visualize
- 2.4K Charting
- 689 Beast Mode
- 43 App Studio
- 39 Variables
- 658 Automate
- 170 Apps
- 441 APIs & Domo Developer
- 42 Workflows
- 5 DomoAI
- 32 Predict
- 12 Jupyter Workspaces
- 20 R & Python Tiles
- 385 Distribute
- 110 Domo Everywhere
- 269 Scheduled Reports
- 6 Software Integrations
- 112 Manage
- 109 Governance & Security
- 8 Domo University
- 25 Product Releases
- Community Forums
- 39 Getting Started
- 29 Community Member Introductions
- 98 Community Announcements
- Domo Community Gallery
- 4.8K Archive