Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

How to calculate % of a subsection?

johny9887
7 - Meteor

Hi,

 

In the attached workflow, I have created a summarize function which groupsby "BranchNumber", "PositionStatus" and counts the "PositionStatus" to display below:

johny9887_0-1657826488073.png

Now, I want to be able to do the following: for each branch number, calculate Inactive Count / Total count of branch number

- For 10001: 1 (inactive) / 5 (total 10001 record) = 20%

- For 10002: 2 (inactive) / 5 (total 10002 record) = 40%

 

After getting this, I want to then create a table like following:

johny9887_1-1657826661095.png

Please let me know the best way possible, thank you for the help

 

 

 

 

4 REPLIES 4
Luke_C
17 - Castor
17 - Castor

Hi @johny9887 

 

Something like this should do the trick - count the total records for each branch and join those back to calc the percentage

 

Luke_C_0-1657827187175.png

 

 

johny9887
7 - Meteor

Hi, Thank you for your reply, one quick follow up question.

 

So is there a way to just select rows with the "Inactive" positionStatus?

 

Thank you

Luke_C
17 - Castor
17 - Castor

Hi @johny9887 

 

Yes, you would use a filter tool. Here's the workflow with that added as well as a select to limit the columns to what is in your original post:

 

Luke_C_0-1657829736347.png

 

johny9887
7 - Meteor

Thank you for the help, really appreciate it

Labels