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!
Solved! Go to Solution.
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
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
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.
Hi @grsomer
If none of the suggestions have helped you, can you attach some sample data and details about what your CountIF does.
Dan
User | Count |
---|---|
19 | |
15 | |
15 | |
9 | |
8 |