Beast Mode Approach to Eliminate Field Character
I have a data set of email addresses and i've used a beast mode calc to create a new field for the domains.
RIGHT(Sent Email
,((LENGTH(Sent Email
))-(INSTR(Sent Email
,'@'))))
The issue I'm having is that some of the email values also include the bracketed name of the user so some
of the results are coming back looking like this:
hotmail.com>
gmail.com>
Is there an additional beast mode calc i can do against this new field I've created to eliminate that character when it exists. When it is there, its always the last character.
I'm non-tech, have zip experience in ETL and have my available dev team members focused on outward (client) facing priorities. My hope is there is a beast mode approach as I'm gaining familiarity there.
Thanks so much.
Best Answers
-
@afieweger If it is always the same character that is showing up, then you can wrap your entire statement in a REPLACE function to remove all instances of the '>' character like this:
REPLACE(RIGHT(`Sent Email`,((LENGTH(`Sent Email`))-(INSTR(`Sent Email`,'@')))),'<','')
1 -
@MichelleH has what I would have suggested, but she mistyped the character you are looking for. :)
Should be:
REPLACE
(
RIGHT
(`Sent Email`,((
LENGTH
(`Sent Email`))-(
INSTR
(`Sent Email`,'@')))),'>','')
**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.2
Answers
-
@afieweger If it is always the same character that is showing up, then you can wrap your entire statement in a REPLACE function to remove all instances of the '>' character like this:
REPLACE(RIGHT(`Sent Email`,((LENGTH(`Sent Email`))-(INSTR(`Sent Email`,'@')))),'<','')
1 -
LEFT(new field ,LENGTH(new field)-1)
IF I SOLVED YOUR PROBLEM, PLEASE "ACCEPT" MY ANSWER AS A SOLUTION. THANK YOU!
0 -
@MichelleH has what I would have suggested, but she mistyped the character you are looking for. :)
Should be:
REPLACE
(
RIGHT
(`Sent Email`,((
LENGTH
(`Sent Email`))-(
INSTR
(`Sent Email`,'@')))),'>','')
**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.2 -
Good catch @MarkSnodgrass!
1 -
You guys rock. Thanks all for the help. Working perfectly!
0 -
Can you guys think of a way to do the same, but remove the last part of a string if it ends with specific characters?
I'm concatenating a bunch of values into a comma-separated list in a column but want to eliminate the trailing comma. i.e.:
"item1, item2, item3, item4," → "item1, item2, item3, item4"
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 101 SQL DataFlows
- 622 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 745 Beast Mode
- 58 App Studio
- 41 Variables
- 686 Automate
- 176 Apps
- 453 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 395 Distribute
- 113 Domo Everywhere
- 276 Scheduled Reports
- 6 Software Integrations
- 125 Manage
- 122 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive