Alteryx Designer Desktop Discussions

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

Output

aparna0208
8 - Asteroid

Hi,

 

Looking for some help with the below. Not sure if this is doable.

 

I have a workflow which uses a filter tool to see if it satisfies a condition and split it into true and false outputs. I need to take all the data from T output and few records from F output.

 

For example Bob Smith has 4 records in T output then I need remaining 6 records from F output. In total I need 10 records for each person. Now another person Shane Williams has 6 records in T output then I need 4 from F output.

 

I used group by function to get the count for each person but not sure how to implement the above logic as the number of records keep varying for each person but I need 10 in total taking all records from T output and remaining from F to have 10 in total

 

Data as below

 

ID              Name                     

1             Bob Smith

1             Bob Smith

2             Shane Williams

2             Shane Williams

2             Shane Williams

3             Robert

3             Robert

3             Robert

3             Robert

 

After using condition in filter 

 

T output

 

ID             Name

1               Bob Smith

2               Shane Williams

2               Shane Williams

3               Robert

 

F output

 

ID              Name

1               Bob Smith

2               Shane Williams

3               Robert

3               Robert

3               Robert

 

 

8 REPLIES 8
grazitti_sapna
17 - Castor

@aparna0208  what should be the output result that you desire? Also, how do you figure out which row from the F output should be considered?

 

Thanks!

Sapna Gupta
aparna0208
8 - Asteroid

@grazitti_sapna The output will have 10 records for each

 

For example

 

Name

Bob Smith

Bob Smith

.

.

.

.

.

.

.

Bob Smith

 

And there is no particular order for F output. From T output if I had 5 rows for Bob Smith then remaining 5 rows for Bob Smith should come from F output. Similarly for Shane Smith if 4 rows from T output then remaining 6 should be from F. I need to include all the data from T output and any rows from F for each person

grazitti_sapna
17 - Castor

Hi @aparna0208, I still have some confusion but I tried something here from my understanding.

Let's say we have 5 Records for Bob and 1 Record for Robert and 1 Record for  Shane in T Output.

Then we have 5 Records for Bob and 9 Records for Robert and 2 Records for  Shane in F Output.

 

As per my understanding, the Final Output should be 10 Records For Bob and 10 Records for Robert and 1 Record for Shane ( from T output)

 

Attached is the workflow if it helps!

 

Thanks!

Sapna Gupta
aparna0208
8 - Asteroid

@grazitti_sapna Thanks for your inputs:) I tried this but not sure if it's working as expected. The other thing to note is F output will have 100's of records for each and T output is the one that will have less records

 

For example 

 

Bob Smith

T output - 5 records

F output - 200 records

 

So when I combine both I need all 5 records from T and remaining 5 from F

 

Another example

 

Shane Smith

T output - 3 records

F output - 400 records

 

Final output - T(3 records) + F(7 records)

grazitti_sapna
17 - Castor

@aparna0208 , check if it works for you?

grazitti_sapna_0-1652902556111.png

Thanks!

Sapna Gupta
DataNath
17 - Castor

How do you get on with this? I just used a random filter to split the data and show it working, as I don't know what your condition is, so you'd just need to replace my input and filter with yours!

 

DataNath_0-1652902869612.png

 

aparna0208
8 - Asteroid

@grazitti_sapna Awesome it worked. Thank you so much:)

grazitti_sapna
17 - Castor

@aparna0208, most welcome 🙂

Sapna Gupta
Labels