Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

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

Need to calculate percentage for categories

AmitI94
6 - Meteoroid

In my dataset, there is a column that has a category- team_name and each record has some value for this field. There is also another column that has values- either completed or not completed. So for each row, I want to first see the category and calculate the percentage of “completed”/total records for that particular category. Is it possible in alteryx?

6 REPLIES 6
Felipe_Ribeir0
16 - Nebula

Hi @AmitI94 

 

Please see if the attached example works for you.

 

Input:

Felipe_Ribeir0_0-1666470672028.png

 

Output:

Felipe_Ribeir0_1-1666470695554.png

 

AmitI94
6 - Meteoroid

Thank you for the response! I don’t want a separate table, I want a new column in the same table with %completed so every row for team_1 should have 50% and every row for team_2 as 100%

ShankerV
17 - Castor

Hi @AmitI94 

 

Could you please share the sample input date and expected output data.

So that I can help you better as per your expectation.

 

Thanks in advance

apathetichell
18 - Pollux

Use @Felipe_Ribeir0 's solution - follow it up with a join tool - you will then use team_name as your join field. You will include only the percentage_completed from the new table - and you will include all fields from the original table.

 

You have now added the percentage_completed field to your original table. This is sometimes known as "windowing" - where an aggregation is appended to the dataset at an individual row level.

Felipe_Ribeir0
16 - Nebula

Hi @AmitI94 

 

As @apathetichell said, just join the output with the input, here is the workflow if you need to see exactly how

 

Felipe_Ribeir0_0-1666560811934.png

 

Felipe_Ribeir0
16 - Nebula

Hi @AmitI94 

 

It worked?

 

If yes, please accept it as a solution :)

 

Thanks!

Labels