Beast Mode to change value in Column A based on Value in Column B
I have a table that includes a Site ID column and a Site Name Column. I want to change the Site Name when the Site ID = x. I have the following code which works but it creates a new column but I don't want a new column, instead I want to change the Site Name in the existing site name column. Many thx in advance!
CASE when `Site ID` = x AND `Site Name` = 'OLD NAME'
then 'NEW NAME'
else `Site Name`
You just need to filter your list first.
I created a basic dataset to try to mimic this for you here:
In this case, I have two Site IDs that have the same customer name, "Clark Kent". The first step is to create two filters. One that contains the data that you don't want to change, and one that has everything you want changed...Don't Change
Data to Change
Then, you use replace text to make your change:
Next, you append the two tables:
Now, any combination of site b and Clark Kent has been changed to site b and Superman
“There is a superhero in all of us, we just need the courage to put on the cape.” -Superman
If you don't want to create a new column, you would need to do this in the ETL. You can use the Replace Text function to replace a site name with a different site name and not add it as a new column**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.0
Thanks for your response!
I couldn't find a way to do this with an ETL because I have several customers with the same name but different site ID. I only want to change the name when both the site ID and name matches what I'm looking for. I can do this in both an ETL and a Beast mode but only by adding a new column.
That's awesome! Thanks Superman!0
- 7.6K All Categories
- 917 Connectors
- 242 Workbench
- 473 Transform
- 1.8K Magic ETL
- 60 SQL DataFlows
- 445 Datasets
- 33 Visualize
- 198 Beast Mode
- 2K Charting
- 8 Variables
- 14 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
- 14 Manage
- 35 Governance & Security
- 19 Product Ideas
- 1.1K Ideas Exchange
- Community Forums
- 15 Getting Started
- 1 Community Member Introductions
- 49 Community News
- 18 Event Recordings
- 579 日本支部