In case you missed the announcement: Alteryx One is here, and so is the Spring Release! Learn more about these new and exciting releases here!

Alteryx Designer Desktop Discussions

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

How can I perform a keyword search and then count the number of times each keyword is used

wlyman
6 - Meteoroid

Hello everyone,

 

I need to conduct a key word search in the item descriptions of about 10,000 orders. Item descriptions are not standardized, so they can be of any length. Here is some sample data:

 

Order #Order AmountItem Description
123$100Blue and green jacket
456$150A red hat
789$175Short socks
987$25Black shoes

 

Keywords:

1. Blue

2. Hat

3. Short

 

In addition to finding the keywords, I need to be able to display a count for each keyword. 

 

I tried using the find & replace function along with a RegEx formula, but could not get what I needed. Any help is greatly appreciated!

6 REPLIES 6
AngelosPachis
16 - Nebula

Hi @wlyman ,

 

You can make use of the Regex_countmatches function which is embedded within the formula tool

 

AngelosPachis_0-1613423122159.png

 

That formula will count how many times a word appears in a string and it is case insensitive. You could turn it into case sensitive by adding a 0 at the end of the function, i.e.

 

REGEX_CountMatches([Item Description], "Blue",0)

 

 

Hope that helps, let me know if that worked for you.

 

Regards,

 

Angelos

 

pedrodrfaria
13 - Pulsar

Hi @wlyman 

 

Please see attached the workflow below:

 

pedrodrfaria_0-1613423250093.png

 

Pedro.

Tyro_abc
11 - Bolide

Hi @wlyman 

I created a small app for this, let me know if you need any explanation.

arundhuti726_0-1613429735015.pngarundhuti726_1-1613429795375.png

 

Best Regards

Arundhuti

wlyman
6 - Meteoroid

Thank you for the reply! I like your answer, however, I need to be able to view the order total by keyword as well. I am not quite sure how to do that.

wlyman
6 - Meteoroid

Thank you for the reply! I like your answer, however, I need to be able to view the order total by keyword as well. I am not quite sure how to do that.

AngelosPachis
16 - Nebula

@wlyman  you can probably do that with a summarize tool, summing the values per record id

 

AngelosPachis_0-1613590015536.png

 

Cheers,

 

Angelos

 

Labels
Top Solution Authors