Mimic Vlookup in Dataset?
As the title says, I am trying to mimic a vlookup on a dataset. I am using an ETL that is connecting different membership logs from SF. Basically every time a member leaves or joins it creates a new log. On one dashboard we are looking at data based on all the members who joined this year but also left this same time frame. So my dashboard data is all filtered by join logs essentially, since it is only join logs they don't include the termination reasons. How can I get the termination reason to apply to all member logs with the same ID? (Would be ideal if I could make a new column in a view data set)
Data looks like this:
Member ID | Log Status | Termination Reason |
---|---|---|
1234 | Join | |
1234 | Leave | Too expensive |
5678 | Join | |
5678 | Leave | Found alternative solution |
1111 | Join | |
1111 | Leave | Uninterested |
And I want it to look like this:
Member ID | Log Status | Termination Reason |
---|---|---|
1234 | Join | Too expensive |
1234 | Leave | Too expensive |
5678 | Join | Found alternative solution |
5678 | Leave | Found alternative solution |
1111 | Join | Uninterested |
1111 | Leave | Uninterested |
Best Answer
-
@deona720 Joins are the ETL equivalent of vlookup, with a few minor differences. You can read more about joins in this Knowledge Base article. In this case I would recommend creating a branch of your dataflow that filters your input dataset on Log Status = Leave so that you have one row per Member ID that includes the Termination Reason. Then use a left join with the original input on the left and the filtered data on the right, using Member ID as your join field. Drop the Termination Reason from the left table and the Log Status from the right table to mimic the output from your example.
2
Answers
-
@deona720 Joins are the ETL equivalent of vlookup, with a few minor differences. You can read more about joins in this Knowledge Base article. In this case I would recommend creating a branch of your dataflow that filters your input dataset on Log Status = Leave so that you have one row per Member ID that includes the Termination Reason. Then use a left join with the original input on the left and the filtered data on the right, using Member ID as your join field. Drop the Termination Reason from the left table and the Log Status from the right table to mimic the output from your example.
2
Categories
- All Categories
- 1.4K Product Ideas
- 1.4K Ideas Exchange
- 1.4K Connect
- 1.1K Connectors
- 278 Workbench
- 4 Cloud Amplifier
- 4 Federated
- 2.7K Transform
- 89 SQL DataFlows
- 557 Datasets
- 2K Magic ETL
- 3.3K Visualize
- 2.3K Charting
- 571 Beast Mode
- 11 App Studio
- 28 Variables
- 579 Automate
- 141 Apps
- 414 APIs & Domo Developer
- 23 Workflows
- 1 DomoAI
- 28 Predict
- 12 Jupyter Workspaces
- 16 R & Python Tiles
- 352 Distribute
- 92 Domo Everywhere
- 258 Scheduled Reports
- 2 Software Integrations
- 92 Manage
- 89 Governance & Security
- 9 Product Release Questions
- Community Forums
- 42 Getting Started
- 28 Community Member Introductions
- 88 Community Announcements
- 4.8K Archive