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.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 292 Workbench
- 4 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 95 SQL DataFlows
- 602 Datasets
- 2.1K Magic ETL
- 3.7K Visualize
- 2.4K Charting
- 695 Beast Mode
- 43 App Studio
- 39 Variables
- 658 Automate
- 170 Apps
- 441 APIs & Domo Developer
- 42 Workflows
- 5 DomoAI
- 32 Predict
- 12 Jupyter Workspaces
- 20 R & Python Tiles
- 386 Distribute
- 111 Domo Everywhere
- 269 Scheduled Reports
- 6 Software Integrations
- 113 Manage
- 110 Governance & Security
- 8 Domo University
- 30 Product Releases
- Community Forums
- 39 Getting Started
- 29 Community Member Introductions
- 98 Community Announcements
- Domo Community Gallery
- 4.8K Archive