I have a column of part numbers and I need to exclude any rows where a part number has a character
Best Answer
-
@TripleZ I agree with Mark's solution. You can also try using the below formula in a filter tile to check whether the value has only numeric characters. The REGEXP_LIKE function will return 1 if it matches and 0 if it does not, so you can specify that you only want to keep the matches
REGEXP_LIKE(`Part`,'[0-9]*') = 1
1
Answers
-
You can use the split columns tile in Magic ETL to split up your string by looking for the comma. You would do multiple splits in that tile so that you can get to the 3rd and 4th entries. You can then do a filter tile where you filter out entries that have the values you want to exclude. Here's a KB article on the split columns tile.
You can also use the SPLIT_PART function to do this in a formula tile.
**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.1 -
I think I was unclear in my explanation. Each of those 4 values are in the same column on different rows. I need a way to look at a column and determine if the first or last character is non-numeric.
Thanks,
Mike
0 -
You can use LEFT(fieldname,1) to get the first character and RIGHT(fieldname,1) to get the last character. You can then test for numeric by using TRY_CAST(leftcharacter as integer). If it returns null then it is non-numeric.
I would create separate fields in your ETL for each of these functions so it is easier to test as you work through it.
**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 -
@TripleZ I agree with Mark's solution. You can also try using the below formula in a filter tile to check whether the value has only numeric characters. The REGEXP_LIKE function will return 1 if it matches and 0 if it does not, so you can specify that you only want to keep the matches
REGEXP_LIKE(`Part`,'[0-9]*') = 1
1 -
Thanks for the follow up. the REGEXP_LIKE worked for me.
Mike
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
- 697 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