Weekly Challenge

Solve the challenge, share your solution and summit the ranks of our Community!
New content is available in Academy! You may need to clear your browser cache for an optimal viewing experience

Challenge #35: Data Cleansing Practice

Highlighted
Alteryx Certified Partner

 

Spoiler
 

I found the TrimLeft and other string functions within the formulas module to be quite helpful for this exercise.
Handled the last 2 challenges with a single formula using conditional logic commands.

 

workflow toolsworkflow tools

 

 

 

Highlighted
Alteryx Partner
Spoiler

 

Spoiler
Solution-Part1.PNGSolution-Part2.PNGSolution-Part3.PNGSolution-Part4.PNG

Part 1:
- Convert input to number using ToNumber function














Part 2:

- Convert input to number using ToNumber function (this automatically removed all text characters - but did have to resize to INT32 to hold larger number)

 

 

 

Part 3:
- Remove "ID" from right 2 characters of field (if it exists)

 

 

 

 

 

 

 

 

 

 

 

 

Part 4:

- Calculate string length

  -- If = 6 append "SC" to front

  -- If >8 grab left-most 8 characters

  -- Otherwise, no change

 

 

 

 

 

 

 

 

 

 

 

Pleasant surprise was converting string to number removed text automatically.

 

Lessons learned:

- converting string

- be careful about length of new field (can be huge accidentally)

Highlighted
 
Highlighted
Alteryx
Alteryx

Here is my solution!

Highlighted
Atom

Hi, 

 

Solution is attached. Great challenge!!

Highlighted
Asteroid

Good Regex practice

 

Spoiler
WeeklyChallenge35.PNG
Highlighted

Challenge 35 completed

 

Spoiler
2019-09-26 13_15_46-Window.png
Highlighted
Asteroid
 
Highlighted
Asteroid

Thanks for the challenge! This is my solution.

Meteoroid

Sharing my solution!