Is there a way to duplicate a value one row down?
I have a column with a numeric value and null value every other cell. I want to replace the null cells with the numeric value that is directly above it.
Thanks in advance!
Answers
-
You can use the window function tile in Magic ETL. The function want to apply is LAG.
This article gives more info, scroll down to the Rank & Window Tile section:
“There is a superhero in all of us, we just need the courage to put on the cape.” -Superman1 -
Is there a way I could do this using an add formula tile; the Rank & Window tile does not seem to work.
For context, every odd row has a value in this column and every even row is null. I'm trying to fill the cells in the even rows with the value right above it.
I'm trying to use the lag function in the add formula tile, but is seems that it isn't a recognized function for the add formula tile.
0 -
Could you clarify the problem you're having with Rank & Window? @ST_-Superman-_ is correct in saying that the Lag function is what you want.
A lag of 1 will give you a new column whose values are all offset by 1 from those of its source column. That's not a complete solution, though, since you'll still have nulls in every other value. The next step is to use Add Formula with the "coalesce" function to make a column that has the non-null value from either the original or the lagged column, like so:COALESCE(my_original_column, my_lag_colum)
Randall Oveson <randall.oveson@domo.com>
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 737 Beast Mode
- 56 App Studio
- 40 Variables
- 684 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 46 Workflows
- 10 DomoAI
- 35 Predict
- 14 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 123 Manage
- 120 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive