Alteryx Designer Desktop Discussions

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

Matching a row string with row+1 and replacing row+1 string with the row string

danial_j
8 - Asteroid

Hi everyone,

 

I hope all of you are having a good start of the year.

 

I was wondering that this might be actually simple but I don't know how to implement that. Here is the example dataset:

-----------------------------

ADV

Bravo

Bravo Tech

Gamma group

Gamma Industries Co

------------------------------


Now there are only 3 companies in this field (ADV, Bravo and Gamma). Idea is to merge this field into three rows only (3 companies).

 

- I know atleast for the first 4 rows. I could do something like string matching and if string of row matches row+1 (something like fuzzy match with a threshold or matching the first word without spaces), then the following row+1 can be replaced with the row string. Any idea how to do this?

 

- For the last two rows, I am not sure if that is even possible to handle such cases. I tried removing words such as "group" "co" and many more but this takes forever and lot of visual inspection of field which has more than 10,000 companies.

 

A help will be much appreciated.

2 REPLIES 2
mbarone
16 - Nebula
16 - Nebula

If you're certain any value with the string "adv" should all translate to just "adv", and the same holds true for the gamma & bravo, I would do something like create a conditional formula like:

IIF(Contains([DataField],'adv'),'adv',

IIF(Contains([DataField],'gamma'),'gamma',

IIF(Contains([DataField],'bravo'),'bravo',

Null()

)))

 

Using Null just in case one of the values does not contain adv, gamma, or bravo.

pedrodrfaria
13 - Pulsar

Hi @danial_j 

 

Would a fuzzy matching logic work for this example?

 

pedrodrfaria_0-1610049448415.png

 

Labels