ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

How to remove specific data (words, numbers,etc. - not the same each time) from a column

arieta
Asteroide

Hello All, 

 

Thank you in advance for your help! 

 

I have a column that has data that needs to be removed from certain cells, however the problem is that these data are not the same in each row. Please see below an example:

Column as is NowColumn I need it to be
33
22
xxx, uyq: 9 and yyy:49
zzz: 5 and ddd: 15
66
1 / 10,0001
15 RESPOSTAS 15
zajaccount
Cometa

Hi Arieta,

 

could you explain the issue in more detail please? Is there any specific logic as to what data should be in the final output?

 

For instance in this example:

 

xxx, uyq: 9 and yyy:4, why are we choosing 9?

zzz: 5 and ddd: 1 and here, why 5 and not 1?

 

Is it perhaps always the first number that appears in the cell?

arieta
Asteroide

Hello, 

 

Thank you very much for your reply. 

 

I should always use the higher number that appears in the cell and remove the text in each cell and the rest of the numbers or characters. 

zajaccount
Cometa

Hi,

 

then in this case:

 

1 / 10,000

 

why do we take the 1 instead of 10,000?

 

 

arieta
Asteroide

Hello, 

 

This represents that 1 is divided by 10,000, however in my case there is no need to have the 10,000 in the column so I want 10,000 to get removed as well. 

In my column, there are cases of: 1-5 /10,000. So, in this case I only need to keep the 5, as this is the highest number (we don't get into consideration the 10,000 as we assume the division in the column title). 

 

Hope this was helpful!

Thank you once again. 

zajaccount
Cometa

To be honest I have some troubles imagining what your dataset looks like.

 

Are the cell options limited to certain cases?


For instance, I understand that you may have fields where:

 

- only 1 number occurs and this number should come out as the desired output

- strings and several numbers occurr - in this case, strings should be removed and the highest number should be taken into consideration

- fractions occurr - in this case, the denominator (ii.e. the value "after /" should be removed and the higher number from the numerator should be considered

 

Are the scenarios limited to these options?

arieta
Asteroide

Hello, 

 

Exactly, these are the possible scenarios. So, my desired output is to get a column only with numbers (the highest number in each cell) 

 

Thank you!

zajaccount
Cometa

Hi,

 

in this case, this workflow should do the job - let me know what you think.

 

Kind regards

arieta
Asteroide

Hello, 

 Thank you for your help! 

Unfortunately, this does not work as sometimes the numbers contain decimal places. For example, there are cases that the numbers are 3.1, 0.002, 2.05, etc. 

zajaccount
Cometa

Hi, 

 

I adjusted the workflow. I tested it on the following examples:

 

zajaccount_0-1588168976905.png

and it worked - please let me know if you have any other edge cases where it fails.

Rótulos
Autores com maior número de soluções