Free Trial

Alteryx Designer Desktop Discussions

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

Calculate the percentage

Sshasnk
8 - Asteroid

Hi Guys, I have a dataset where I have to calculate the percentage of occurance

 

Example: Input

 

Product Id AppleMangoBanana
123Yes  
123YesYes 
245 Yes 
245 YesYes
245 YesYes
456   
456YesYes 
456Yes  

Rules: 

1. If the percentage is greater than 80% then put the column name should be in the comment and if it is lesser than 80% then put

two largest percentages example: 456 <- product id 

 

Example:

1. product id 123 for apple we have two yeses in the apple which is 100% because both the rows have yes and the rest does not so put a comment as an apple.

2. Product id 456 apple is 66.66% and mango is 33.33%. So both are less than 80% so put both of them in comment

 

 

 

Output: 

Product IdAppleMangoBananaComment
123100%50% Apple
245 100% 66.66%Mango
45666.66%33.33% Apple, Mango
1 REPLY 1
atcodedog05
22 - Nova
22 - Nova

Hi @Sshasnk 

 

Here is my take on a dynamic solution.

 

Workflow:

atcodedog05_0-1644234892623.png

 

Hope this helps : )

 

Labels
Top Solution Authors