Alteryx Designer Desktop Discussions

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

Multi row tool or which tool to use?

Rag1
5 - Atom

Hi, I am new here and this is my first post, can someone please guide me here. Below is my sample data set

 

Request IDFlag 1Flag 2Flag 3
A100
A010
A100
B100
B001
B010
B000
B010
C001
C010
C000
D010
D000
D100
D001

 

I need to extract distinct Request ID's that have all three flags has 1 in any row into a new column. In the above table the final output column would identify 'B' and 'D' Request ID's as they have 1 in columns Flag 1, Flag 2, Flag 3. 

 

5 REPLIES 5
cmcclellan
13 - Pulsar

I'd do this ... 

- Summarize tool .... group by RequestID, sum Flag1, Flag2, Flag3

- Filter tool ... Flag1 > 0 and Flag2 > 0 and Flag3 > 0

messi007
15 - Aurora
15 - Aurora

@Rag1,

 

Please see below :

 

messi007_0-1630394115808.png

 

attached the worklfow,

Regards,

atcodedog05
22 - Nova
22 - Nova

Hi @Rag1 

 

Here is how you can do it.

Workflow:

atcodedog05_0-1630394525125.png

 

1. Using summarize tool I am finding of max of flag for each record id. This way is a flag has atleast a row as 1it will be taken in max.

2. Using filter keep only record ids where max_flag1+max_flag2+max_flag3 (i,e all flag atleast one 1).

3. Using join tool joining on record id. This way only record ids with all flags present in outputted.

 

Hope this helps : )

 

Rag1
5 - Atom

Thanks everyone, all solutions worked!

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @Rag1 

Cheers and have a nice day!

Labels