Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Cleansing a Blended % Field

Jatrog19
5 - Atom

Hi Alteryx Community,

 

I've got a column that needs to be in % with a numeric meta tag so that I can calculate on it. So I used the cleanse tool to strip it of any symbols and then used a formula tool to divide it by 100. Problem solved, right? Well, I discovered that while most of the rows are structured as "90%", others are structured as "0.5". So my workflow turns the "0.5" into "05" and then divides that by 100, which gets to "0.05" not "0.5" as it should be.

 

Thoughts on how to create a workflow that accounts for both types of percentages within the same column?

 

Thanks again for your support,

Josh

1 REPLY 1
tim-regas
8 - Asteroid

Hi @Jatrog19,

If you are certain that the only two types coming in are % and decimal format. One option would be to use a single formula tool with an if statement. First check if it has a "%" then strip the %, convert to a number and divide by 100, otherwise treat it as a number. Below is a mockup.Converted number.png

Labels
Top Solution Authors