Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Include Data found in Countif

grsomer
8 - Asteroid

Hi!

 

I am trying to recreate an excel function that conducts a countif on a column, then deletes the records that resulted in 1 in the countif. 

I have attached a photo of my workflow below. Basically, I am using a Summarize tool to conduct the countif, then using the Filter tool to filter out all records who's countif resulted in 1. I am now stuck trying to Join this back into my workflow, as I don't know how to only include the fields that were found in my countif and filter. I have tried a Join, but that is including more than the records included after my filter. 

Is there a way to only use the data that was found in the countif in my workflow?

Any help is appreciated! Thank you!

5 REPLIES 5
MichaelSu
Alteryx Alumni (Retired)

Hi @grsomer ,

 

Perhaps try using a RecordID tool earlier in the workflow and joining back on RecordID later on. Take a look at this article.  https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Countif/td-p/53714

 

Thanks,

Mike

estherb47
15 - Aurora
15 - Aurora

Hi @grsomer 

 

My best guess here is that you're getting records that you don't want because they were summarized, so there's not an exact record to record match for your join. 

Try adding a record ID somewhere before the Summarize tool, and then be sure to include that record ID field in your Summarize tool as "concatenate". I recommend you leave the default comma as the delimiter.

Next step would be to separate the T (assuming those are the ones you want to keep. The F if they aren't) from the Filter back out to the rows. You can do this with Text to Columns, separating into Rows (not columns) on the delimiter. 

 

Then join on the Record ID field, and you should have what you want.

 

This is a best guess. Unsure if it will work because I can't see into your summarize tool.

 

Let me know if this helps!

 

Cheers,

Esther

grsomer
8 - Asteroid

Hi @MichaelSu thank for the suggestion, Unfortunately I have seen that article and tried Joining on RecordID already, and neither have helped. The issue is I am only bringing in the results of the countif that have a value of more than one, meaning if the result of the countif was 4, for example, I would need to include all 4 of those entries in my workflow, not just the one that is included in the output of the countif. 

geraldo
13 - Pulsar

I replicated the image and added a suggestion of how the countif function might work.

 

Workflow image is attached

danilang
19 - Altair
19 - Altair

Hi @grsomer 

 

If none of the suggestions have helped you, can you attach some sample data and details about what your CountIF does.  

 

Dan

Labels