Creating a rolling standard deviation within magic ETL
I'd like to create rolling standard deviation within Magic ETL that uses the previous 90 rows (or previous 90 days) as the window. I was able to do this within MySQL before, however, I'd like to do this within Magic ETL.
For example if I have 100 rows of data each row should reference the previous 90 rows as the sample size for the standard deviation (ex. row 5 would reference previous 5 rows, row 10 prev 10 rows... then once it hits 90 it would reference 90 rows... 91 would be row 2 - 91)
Answers
-
I'm not sure how large your data set is, but I was able to accomplish this in Magic ETL in the following way…
My dataset has two columns, row count and number. In this case, number is just a random number between 1 and 100.
- Added a constant to my dataset and duplicated the tile
- Cross Join the two tiles on my Constant value
- by naming the second tile 'duplicate' the autofix feature of the join tile will append 'dupliacte.' to all of the duplicate rows of data
- The Filter tile is where I am setting the 90 row window. I use two formula rules:
- Then I use the Group by tile to create a formula and calculate the Standard deviation:
Hope this helps. This question has been bothering me for a long time because I couldn't figure out a solution.
“There is a superhero in all of us, we just need the courage to put on the cape.” -Superman1
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
- 602 Datasets
- 2.1K Magic ETL
- 3.7K Visualize
- 2.4K Charting
- 695 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
- 386 Distribute
- 111 Domo Everywhere
- 269 Scheduled Reports
- 6 Software Integrations
- 113 Manage
- 110 Governance & Security
- 8 Domo University
- 30 Product Releases
- Community Forums
- 39 Getting Started
- 29 Community Member Introductions
- 98 Community Announcements
- Domo Community Gallery
- 4.8K Archive