Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Count workflow

denisstravs
7 - Meteor

Hi,

 

could someone please help me with my workflow? I have created a workflow, but I am not getting the desired results. Why doesn't the tool Formula in the column Check give a final count 6, instead of 2? Where is the issue? In the Key column, I have 6 identical results, is maybe the problem in the Data Type? 

 

Worklow and Excel attached. 

 

denisstravs_0-1686918667777.png

7 REPLIES 7
Kenda
16 - Nebula
16 - Nebula

Hi @denisstravs 

 

In your workflow, you use the expression CountWords([Reference]). According to this article, CountWords() returns the count of words in the specified string. Words are defined by characters separated by a space.

 

Kenda_0-1686919784783.png

 

 

In your Reference field, there are two sets of characters separated by a space which is why the Check expression is resulting in a 2.

geraldo
13 - Pulsar

@denisstravs 

 

I don't understand what you want to calculate.
you have 6 records that came from excel.
in the formula you calculate the number of words,

what do you really want

denisstravs
7 - Meteor

Hi, hmmm, okay, so this is totally wrong. I would like to calculate the total value of the identical keys. In this case, I expect in the column Check to show a total value of 6, since I have 6 identical keys. How can I generate this formula?

 

Kenda
16 - Nebula
16 - Nebula

@denisstravs 

 

Try using the Summarize tool, adding a Group By & Count on your Key field. 

jacobcarman
9 - Comet

You could add a Summarize tool where you group by Key and count Key. That would give 6. You could then append/join that back to the records. If you just need to see how many identical keys, then no need to join it back.

geraldo
13 - Pulsar

@jacobcarman 

 

geraldo_0-1686920953830.png

 

jacobcarman
9 - Comet

@geraldo 

I would also add a group by Key and move it to the top. That way if you have multiple unique keys you get a count for each.

Labels
Top Solution Authors