Alteryx Designer Desktop Discussions

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

Output

aparna0208
8 - Asteroid

Hi,

 

I'm trying to build a logic using Alteryx and not sure if that's something doable. I have a dataset where it contains name of the person and some percentage as seen below

 

Name                                                     Percent

Bob Smith                                              35

George Williams                                    45

Alex                                                        65

 

Based on another requirement I got help from the community and built a workflow which uses a macro to output data as shown in below example. I used the rand function which assigned a random value for each group and I would filter the ones where rand<0.3. I assigned a rank for each group because wanted to apply rand filter within each group as seen below

 

Input

 

Name                                                         Rand                        Rank

Bob Smith                                                  0.1                             1

Bob Smith                                                  0.2                             2

Bob Smith                                                  0.5                             3

George Williams                                        0.2                             1

George Williams                                        0.5                             2

Alex                                                           0.3                              1

Alex                                                           0.3                              2

Alex                                                           0.3                              3

 

Output

 

Name                                                        Rand                         Rank

Bob Smith                                                 0.1                                1

Bob Smith                                                 0.2                                2

George Williams                                       0.2                                1

 

The filter condition was standard for each group where rand<0.3. Now the requirement has changed and I'm not sure how to do this. As seen in first example each person has a percentage. I need to first check for that value and based on that apply the filter.

For example: Bob smith has a percentage of 35 so the filter should work like rand<0.35. Next George Williams has a percentage of 45 so the filter should work like rand<0.45 and so on. 

 

Thank you!

1 REPLY 1
Nanoq
8 - Asteroid

Hey
you should join up the two inputs by name, so that you have all in one data sheet
then do a custom filter
see the workflow below.
let me know if this does what you want

Nanoq_0-1634636345915.png

 

Labels