Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

How to replace all values in column to 0

overhead_press
8 - Asteroid

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
3 REPLIES 3
MarqueeCrew
20 - Arcturus
20 - Arcturus

@overhead_press  ,

 

 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.
NexBK
7 - Meteor

Hi, @overhead_press 

If the data type is numeric, change to String, and use the Regex Tool to change all characters (.) to zero.

NexBK_0-1660002064051.png

 

flying008
15 - Aurora

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])

 

ff.png

Labels
Top Solution Authors