Thanks for your question! The 'Frequency' tool in the 'Data Investigation' category of the Predictive suite will take care of this for you. I've attached an example workflow here demonstrating how to use it.
Since the 'Frequency' tool is in the predictive suite, please make sure you have the predictive tools installed. If you do not have them installed, you can download them here.
Thanks for posting this workflow that is compatible with the version installed on my system. Also, I have the "Predictive Tools" installed on the system. I can see them grouped under "Predictive" tab.
However, I am still getting a message from Alteryx which reads "The Workflow references macros that are missing on inaccessible. Saving the workflow will disable these tools". Do I need to still install any other Predictive tool for the workflow to work on my machine. Currently on my Alteryx application, I see a "?" on the 2nd tool in the workflow and there is no connection between this tool and Select Tool.
I am also attaching the sample Input and Sample output for your perusal. Could you please take a look at the attached excel file and see if there is a way to address this requirement.