How to replace all values in column to 0
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
overhead_press
8 - Asteroid
‎08-08-2022
04:24 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Below I have the sample dataset and I am wondering how do I replace all values to be 0's like my desired dataset? Thanks!
Sample:
6230 |
17697 |
8977 |
3911 |
03619 |
Result:
0000 |
00000 |
0000 |
0000 |
00000 |
Labels:
- Labels:
- Transformation
- Workflow
3 REPLIES 3
20 - Arcturus
‎08-08-2022
04:33 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
if that's a string then:
replacechar([stuff],"123456789",'0')
should work
Cheers,
mark
Alteryx ACE & Top Community Contributor
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
NexBK
7 - Meteor
‎08-08-2022
04:41 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi, @overhead_press
If the data type is numeric, change to String, and use the Regex Tool to change all characters (.) to zero.
flying008
15 - Aurora
‎08-08-2022
04:50 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi, @overhead_press
If your field type is string, follow the below formula, if it is number, you need convert to string with tostring([Num])
