Weekly Challenges

Solve the challenge, share your solution and summit the ranks of our Community!

Also available in | Français | Português | Español | 日本語
IDEAS WANTED

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

SUBMIT YOUR IDEA

Challenge #35: Data Cleansing Practice

CaraI
Alteryx
Alteryx

Missed posting this one from last year!

 

Spoiler
35 Workflow.jpg

 

RoDO
8 - Asteroid

My solution

 

Spoiler
regex to the rescue
1 REGEX_Replace([Field1], '^0+', '')
2 REGEX_Replace([Field1], '(^0+|[[:punct:]]|[a-z\s])', '')
3 REGEX_Replace([ID], 'ID$', '')
4 IF Length([Safety Code]) = 6
THEN 'SC' + [Safety Code]
ELSE REGEX_Replace([Safety Code], '[\w\s[:punct:]]{'+ToString(Length([Safety Code]) - 8)+'}$', '')
ENDIF
challenge_35_RODO_Solution.png
Inactive User
Not applicable

Here is the solution

ashleyannyeong
5 - Atom

Can anyone help me understand the logic of the '\:.*$' in the 2nd Trimmed formula in the 2nd part of this challenge? I'm particularly struggling around the \: part. 

 

Thank you! 

Inactive User
Not applicable

The regex \:.*$ is trimming any whitespace: and letters (a-zA-Z).

mat_budden
8 - Asteroid

Hi All,

 

Please find my Results Below.

 

Spoiler
Used Formula's for all.

 

Thanks.

 

Mat

tony_beck
6 - Meteoroid
Spoiler
clipboard_image_0.png
sgrabish1
8 - Asteroid

Thanks for exercise

Inactive User
Not applicable
 
Steph3388
7 - Meteor

Lots of different ways to do this. Here's my way: