Google is your best friend

So Day 2 of covering the Alteryx fundamentals has come and gone. We spent the majority of today finishing off our analysis into some sales data trying to find the top 20% SKU's for revenue. Took me back to my auditing days somewhat analyzing various sales and inventory listings etc.

So far the pace of the information coming at us has been pretty good and you make the realization that its not really about how much information you can really remember in the classroom but how many times you end up using these tools in practice that will help solidify the knowledge into your head. For all you gym goers out there its about getting the reps in!

At the end of the day we also let loose on a Alteryx challenge of our choice (only the basic ones of course). I had been quite happy for myself that I picked challenge #35 which seemed quite easy at first. Having freshly learned some of the tools I needed I zoomed through the first 3/4 of the challenge no problem. The last bit of the challenge did have me stumped for awhile though as it required me to write a formula.

My task was to make it so that if the table above had a safety code which was more than 8 characters remove anything after and anything that was only 6 characters long to add the letters SC at the start. I immediately knew I would have to use the formula tool and write an IF statement but how to word it was the question as I had little to no experience with these formulas. This is where google is your best friend.

Chances are that you are not the first person in the world to ever have this question and someone on the internet has already asked and answered it. Knowing what to google is a skill in itself I guess but if you've made it into the DS I'm sure you've already got that skill in the bag.

Anyway I digress, After some googling my solution is shown below:

The first formula is pretty logical in that it says if the length of the safety code column is equal to 6 characters then add the characters SC to whatever is already in the safety code column if its not just keep it as is.

The second code basically just limits the amount of characters in the column starting from the left to 8 characters in length.

This may or may not be the easiest or most efficient way to have completed this task but it worked!

Author:
Shahbaz Khan
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2025 The Information Lab