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.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 299 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 729 Beast Mode
- 54 App Studio
- 40 Variables
- 681 Automate
- 175 Apps
- 451 APIs & Domo Developer
- 46 Workflows
- 9 DomoAI
- 34 Predict
- 14 Jupyter Workspaces
- 20 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 121 Manage
- 118 Governance & Security
- Domo Community Gallery
- 33 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive