Formula in Magic ETL
Hello,
As a newbie in Domo BI, I would highly value your assistance in resolving an issue that I have been unable to solve.
I want to write a formula in Magic ETL that does the same function as the one in Excel from the picture: Compate D2 and D3 and if they are the same AND M3 is blank, take the value from N2. If not, then take the value from M3.
If you found this post helpful, please use 💡/💖/👍/😊 below! If it solved your problem, don't forget to accept the answer.
Answers
-
Hi @Manasi_Panov in order to compare values from different rows, you will need to first use LEAD function in a Rank & Window ETL tile ( ) to identify the values of Work Type and Order on the row above. Then you can use a CASE Statement in a Forumla tile like this:
case when
Order
=Next Order
andWG Combi
is NULL thenWork Type
elseWG Combi
end1 -
Hi @MichelleH
Thank you for your input, however, I have some concerns. Firstly, I think I require the LAG function instead of LEAD since I want to compare the Order of the previous row, correct?
The second problem is that the Work Type column doesn't exist. The formula with the logic I shared in Excel is creating the Work Type column, so there is no way to use the LAG function on it. Nonetheless, I appreciate your assistance and looking for your answer.
If you found this post helpful, please use 💡/💖/👍/😊 below! If it solved your problem, don't forget to accept the answer.
0 -
Hi @MichelleH ,
Actually, I think I was able to do it your way, but I still, have some issues. Here is the result for one Order:
I used the LAG function to create the "Previous Service Order" based on the "Service Order" and then used the LAG function again to generate the "Work Type Temp" from "WG Combi". Then, I used the following formula for the "Work Type" column. However, the last row is still empty and it ought to take the value from "Work Type Temp" - IQOQ. Probably, my formula syntax is messed up. Could you please assist?
If you found this post helpful, please use 💡/💖/👍/😊 below! If it solved your problem, don't forget to accept the answer.
0 -
Hi @MichelleH ,
I found the problem. The "empty" cells were not exactly empty. There was " " in them. But now I'm facing another problem :)
In cases like this one:
I got:
If you found this post helpful, please use 💡/💖/👍/😊 below! If it solved your problem, don't forget to accept the answer.
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
- 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