Rolling 12 Month Average in Magic ETL
Hi there!
Was hoping someone would have a solution for what I am trying to do. I want a 12 month historical average in line with the current month in my dataset. (Sample datasets will only show 3 month)
This is a sample dataset of what I am working with:
*"Desired Column" would be the field that holds the historical average.
In this case the Desired Column in the first row = 33.3 because:
- Add all the "Type" = Cloth and "Name" = Chest has a weight of (33.9 + 33.3 + 32.6)
2. Divided by the last 3 months (99.8 / 3) = 33.3
Month-end Date | Country Name | Type | Name | Weight | Desired Column |
---|---|---|---|---|---|
31-Mar-2024 | United States | Cloth | Chest | 33.9 | 33.3 |
31-Mar-2024 | United States | Cloth | Boots | 33.5 | 33.1 |
31-Mar-2024 | United States | Leather | Chest | 36.2 | 35.2 |
31-Mar-2024 | United States | Leather | Boots | 37.0 | 35.7 |
29-Feb-2024 | United States | Cloth | Chest | 33.3 | 33.3 |
29-Feb-2024 | United States | Cloth | Boots | 33.3 | 33.1 |
29-Feb-2024 | United States | Leather | Chest | 35.6 | 35.2 |
29-Feb-2024 | United States | Leather | Boots | 35.9 | 35.7 |
31-Jan-2024 | United States | Cloth | Chest | 32.6 | 33.3 |
31-Jan-2024 | United States | Cloth | Boots | 32.5 | 33.1 |
31-Jan-2024 | United States | Leather | Chest | 34.0 | 35.2 |
31-Jan-2024 | United States | Leather | Boots | 34.2 | 35.7 |
I am looking to get this done within Magic ETL using whatever tiles makes the most sense.
Any help would be appreciated!
Thank you in advance!
Best Answer
-
You are welcome @david_cunningham ! Keep up the great work on the answers!
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.0
Answers
-
@MarkSnodgrass has a fantastic YouTube video on this exact topic! Check it out 😁
The video covers 30/60/90 day rolling windows, but you can adapt this to your particular requirements.
Thanks Mark for creating this great video!
David Cunningham
** Was this post helpful? Click Agree 😀, Like 👍️, or Awesome ❤️ below **
** Did this solve your problem? Accept it as a solution! ✔️**1 -
You are welcome @david_cunningham ! Keep up the great work on the answers!
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 754 Beast Mode
- 61 App Studio
- 41 Variables
- 693 Automate
- 178 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive