Replacing IFNull value based on a separate key
Hello and thanks to anyone who responds to this in advance.
I'm relatively new to using DOMO and have been experiencing issues trying to replace null values with the corresponding data. The report that I am using was exported in a weird manner due to how our back end is structured. The primary key (Project ID) exports 2 rows for every value and the column (name) has a null value (every other row). View below for reference.
I would ultimately like to have FirstNameLastName + Supplier ID sit on one row per project ID (so replace if null and delete duplicate rows (which I will do through ETL).
Welcome to Domo!
My recommendation is to think of your single dataset as two separate datasets: one, which has the project Name field populated; and the other, which has the supplied ID field populated. In Magic ETL, you can breakt your single dataset into two datasets using a couple of filter tiles:
- Drag an Input tile onto the canvas and configure it by connecting it to your source dataset
- Drag two Filter tiles onto the canvas and connect the Input tile to each one
- Configure the first Filter tile to exclude rows where supplier ID is not null
- The result of this filter will be only the rows that have values in the Name column
- Configure the second Filter tile to exclude rows where name is not null
- The result of this filter will be only the rows that have values in the supplier ID column
- Drag a Join tile onto the canvas and connect both Filter tiles to the Join tile
- Configure the Join tile by selecting the input data sources and by specifying the joining columns as Project ID column. Depending on your data, I would probably suggest using an Inner join.
- You can preview and test your results at this point by clicking the "Preview" button at the top of the canvas.
- You can then check your results coming out of any tile by clicking that tile and then clicking "Preview".
- If you preview the output of the Join tile, you'll see each column is represented twice. That's because it takes all the columns from both of the sources being joined together. You can clean up that output using a "Select Columns" tile.
Hope that points you in the right direction.
PS: NullIf/Case/Replace statements won't work in this case. That's because those functions operate on a single row of data. What you're trying to do is collapse data from multiple rows of data. Thus, I believe the Filter/Join method I suggested will be your best bet.0
This was successful. Thank you for your help Dan!0
- 7.7K All Categories
- 918 Connectors
- 242 Workbench
- 476 Transform
- 1.8K Magic ETL
- 60 SQL DataFlows
- 446 Datasets
- 35 Visualize
- 198 Beast Mode
- 2K Charting
- 8 Variables
- 16 Cards, Dashboards, Stories
- 1 Automate
- 348 APIs & Domo Developer
- 82 Apps
- 14 Predict
- 3 Jupyter Workspaces
- 11 R & Python Tiles
- 241 Distribute
- 59 Domo Everywhere
- 241 Scheduled Reports
- 15 Manage
- 36 Governance & Security
- 23 Product Ideas
- 1.1K Ideas Exchange
- Community Forums
- 15 Getting Started
- 1 Community Member Introductions
- 49 Community News
- 18 Event Recordings
- 579 日本支部