Is there any way we could replicate Multi-Row formula tile of Alteryx tool in Domo?
This tool is very good to fill in data gaps (if any) based on logic.
Answers
-
Hi @LoveBindal
Have you looked into Window functions? You can do it in either an ETL using the Rank and Window tile (https://domohelp.domo.com/hc/en-us/articles/360042922814-Magic-ETL-Tiles-Rank-and-Window) or you can use window functions within beast modes. Specifically utilizing LAG and LEAD will allow you to get the N prior row or the X next row. I've done a writeup of how to use LAG and/or LEAD for a rolling 3 day average here: https://dojo.domo.com/discussion/52679/domo-ideas-conference-beast-modes-rolling-averages#latest
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1 -
HI @GrantSmith , Rank-Window functions dont work like the MULTI-ROW function works. Let me give you an example, we have following rows,
Here we want value = value(row-1)+1 where row= row-1 else value(row-1) - 0.1
This should bring incremental values in MULTI-ROW but doesnt in our rank-window or windowed function.
Expected output should be :
if we use our tools in domo, then we would get 1,2,3,3,3,2.9,1 resp which is wrong.
Please let me know if you can help me with this.
Thanks🐼
0 -
So this isn't easily possible however you could implement a mysql data flow using some creative hackery using variables. I was able to write up an example using your sample data you had provided to get the results you expected.
SELECT `Dept`,`Value`, COALESCE(`Value`, IF(`tbl`.`Dept`=@pred, @prev+@offset, @offset+@prev-1.1)) as new_value, @offset, CASE WHEN `Value` IS NOT NULL THEN @prev:=`Value` END prev, @pred:=`Dept` pred, @offset:=1+case when `Value` IS NULL THEN @offset ELSE 0 END new_offset FROM `tbl`, (SELECT @pred := null, @prev := null, @offset:=0) var_init
Essentially it's keeping track of how much offset to add if the current value is null. It's not a perfect working version but gives you an idea. If a new department starts with nulls it won't handle that scenario properly for the 2nd null row in a department.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1
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
- 753 Beast Mode
- 61 App Studio
- 41 Variables
- 692 Automate
- 177 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