If contains statement beast mode
I essentially have a list of URLs in one column and need to extract out the advertiser into a new column. I want to use an if contains statement to search every row in data set and see if it holds the pertaining advertiser name. Below is what I what both columns to look like and the code that I tried.
COL.a COL.b
url Advertiser name
CASE
WHEN `Page` LIKE '%adCREASIANs%' THEN 'By Gina'
WHEN `Page` LIKE '%Aerovex SystemsInc%' THEN 'Hemp Beauty'
ELSE 'NA'
END;
Best Answer
-
remove the ; at the end of the syntax
case when `url` like '%goo%' then 'google'
when `url` like '%adCREASIANs%' THEN 'By Gina'
when `url` like '%Aerovex SystemsInc%' THEN 'Hemp Beauty'
else 'na' end
2
Answers
-
remove the ; at the end of the syntax
case when `url` like '%goo%' then 'google'
when `url` like '%adCREASIANs%' THEN 'By Gina'
when `url` like '%Aerovex SystemsInc%' THEN 'Hemp Beauty'
else 'na' end
2
Categories
- All Categories
- 1.2K Product Ideas
- 1.2K Ideas Exchange
- 1.3K Connect
- 1.1K Connectors
- 273 Workbench
- 2 Cloud Amplifier
- 3 Federated
- 2.7K Transform
- 78 SQL DataFlows
- 525 Datasets
- 2.1K Magic ETL
- 2.9K Visualize
- 2.2K Charting
- 434 Beast Mode
- 22 Variables
- 511 Automate
- 114 Apps
- 389 APIs & Domo Developer
- 8 Workflows
- 26 Predict
- 10 Jupyter Workspaces
- 16 R & Python Tiles
- 332 Distribute
- 77 Domo Everywhere
- 255 Scheduled Reports
- 66 Manage
- 66 Governance & Security
- 1 Product Release Questions
- Community Forums
- 40 Getting Started
- 26 Community Member Introductions
- 68 Community Announcements
- 4.8K Archive