How to calculate percentage of whole with string data
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello,
I have column of data containing results that are either pass, fail, or timeout. I want to show these as a percentage of the total records so one can see what percent are pass or fail or timeout. How may I go about doing this? I have tried to create a new calculated field in the data using the formula tool but can not seem to get a formula without an error.
I am new to Alteryx and still trying to get a feel for the software any help is very appreciated!
Best,
Matt
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@mattanderson The frequency Table tool would do the trick if you have the predictive analytics installed. If you don't have it installed, then you should install it! http://downloads.alteryx.com/predictive.html
EDIT: For what it's worth, the frequency table tool is pretty easy to modify if you just needed the percentage. I'm attaching my modified version. It amounts to a transpose, a couple summarizes, join the data together, and then run your formula. The normal frequency table tool requires R (and the predictive analytics install) to make a nice histogram.
Let me know if you have any questions!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Or if you want something sooner than later, use the Summarize tool to Group By and then Count on your field of interest. You can then add a Total with the Formula tool, as well as do the division for the Count of each value by Total.
But the "right" answer is what @Patrick_Digan said. Mine is the lazy but maybe good enough option :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @mattanderson
Firstly - welcome to the community - and congratulations on your first post!
As @gc and @patrick_digan mentioned, you can do this with the predictive tools very easily.
But if you need to just whip this together - here's a flow that works. Take your data, count all records, and in parallel count records by category, then you can use a formula to calculate percentages.
Screenshots and sample workflow attached.
Have a good weekend
Sean
![](/skins/images/D34B41DA407DC996E7BFF253AD24F7E2/responsive_peak/images/icon_anonymous_message.png)