Beastmode filter to show when data exists in both datasets
Hi, I am trying to create a beast mode where if a campaign name matches in both Dataset A and Dataset B, then name the filter 'Match Campaign Name' and everything else 'Doesn't Match Campaign Name'.
Best Answers
-
Ah gotcha. This is going to be best solved here in your ETL. Below is a link to a screen recording where I walk through one way you could solve this:
If I solved your problem, please select "yes" above
0 -
Hi Anna,
I suggest you use a Full outer join on the campaign identifier within the ETL. Here is an example:
When you perform a full outer join and retain both identifier columns, you can read the nulls to determine which rows are present in either dataset, or both datasets. See the included beastmode for reference.
Case
when `Campaign ID (dataset A)` is null and `Campaign Id (dataset B)` is not null then 'Found in A, Missing in B'
when `Campaign ID (dataset B)` is null and `Campaign Id (dataset A)` is not null then 'Found in B, Missing in A'
else 'Found in Both Datasets'
end
0
Answers
-
Hi Anna, you can't create a beastmode to search between two datasets. You can combine those datasets into one and then have a beastmode search between two fields to see if there is a match. This would be the beastmode to check between columns:
CASE WHEN `CampaignField1` = `CampaignField2` THEN 'Match Campaign Name' ELSE 'Does not Match Campaign Name' ENDIf your data is not yet combined, you could create the flag within Magic ETL while you are joining the data. Does your campaign data have unique ID's you can join on instead of the campaign name?
If I solved your problem, please select "yes" above
0 -
Thank you for your help!
The dataset is already appended (below is the screenshot) and essentially, I want to create a card that would be able to detect a campaign if they're named differently from both datasets.I'm not sure if my dataflow is incorrect or my beast mode is set up wrong.
0 -
Ah gotcha. This is going to be best solved here in your ETL. Below is a link to a screen recording where I walk through one way you could solve this:
If I solved your problem, please select "yes" above
0 -
Hi Anna,
I suggest you use a Full outer join on the campaign identifier within the ETL. Here is an example:
When you perform a full outer join and retain both identifier columns, you can read the nulls to determine which rows are present in either dataset, or both datasets. See the included beastmode for reference.
Case
when `Campaign ID (dataset A)` is null and `Campaign Id (dataset B)` is not null then 'Found in A, Missing in B'
when `Campaign ID (dataset B)` is null and `Campaign Id (dataset A)` is not null then 'Found in B, Missing in A'
else 'Found in Both Datasets'
end
0 -
Correction: I reversed the order of the nulls in the beastmode. The corrected beastmode is as follows:
Case
when `Campaign ID (dataset A)` is null and `Campaign Id (dataset B)` is not null then 'Found in B, Missing in A'
when `Campaign ID (dataset B)` is null and `Campaign Id (dataset A)` is not null then 'Found in A, Missing in B'
else 'Found in Both Datasets'
end
0 -
Thank you so much for the video @ColemenWilson ! I found your video very informative and easy to follow.
This worked perfectly and I was able to create my card!0 -
Thank you @nmizzell for your help as well! Very detailed and helpful!
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 731 Beast Mode
- 55 App Studio
- 40 Variables
- 682 Automate
- 175 Apps
- 451 APIs & Domo Developer
- 46 Workflows
- 10 DomoAI
- 35 Predict
- 14 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 122 Manage
- 119 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 107 Community Announcements
- 4.8K Archive