Lag a pre-existing column?
Hi there, I'm wondering if it's possible (with Magic ETL or beast mode) to creation functions (like rank and window) that can lag value from Column 1 to Column 2, where both columns already exist.
Full context:
We have 3 columns. Monthly total, Last month, Year to date. I'm trying to generate a new YTD total every month by adding the monthly total to last month's YTD. My current ETL process is recursive but I can't verify if it's working, and I'd like to remove any problem points.
ETL flow should look like [data/monthly total already present] > generate last month's total > add those two values together.
Generating last month's total is using rank and window with lag, currently, but because it's pulling from column 3, which doesn't have a value until after the rank and window step, so the reality is that it looks like:
[data/monthly total already present] > create blank YTD > generate last month's total (from YTD) > calculate actual YTD from those values > add the output to the beginning of the ETL flow, joining to the "create blank YTD" and populates the result from the previous run.
It just seems senselessly complicated, and I'm open to any other ideas of how we can do this creatively. It'd be great if the rank and window lag could drop the values of last month into a column that already exists, so I could put the addition function earlier in the ETL and remove the need for a recursive method. Month columns at the beginning are how totals are sorted, just YYYY-MM.
Best Answer
-
Disregard this question, found the answer in another post
2
Answers
-
Disregard this question, found the answer in another post
2
Categories
- All Categories
- 1.9K Product Ideas
- 1.9K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 302 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 104 SQL DataFlows
- 637 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 761 Beast Mode
- 65 App Studio
- 42 Variables
- 703 Automate
- 182 Apps
- 458 APIs & Domo Developer
- 53 Workflows
- 10 DomoAI
- 39 Predict
- 16 Jupyter Workspaces
- 23 R & Python Tiles
- 401 Distribute
- 116 Domo Everywhere
- 277 Scheduled Reports
- 8 Software Integrations
- 132 Manage
- 129 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 111 Community Announcements
- 4.8K Archive