Alteryx Designer Desktop Discussions

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

Group Columns with similar names

gbufalino
6 - Meteoroid

Hi all,

I'm trying to merge columns with common names and keep the value associated with it. Ideally, I'd like to group all columns that have the name "RAT" and keep the positive/negative. 

So, if column 1 is empty, then column 2. if column 2 is empty, then column 3. if all are empty, then "not tested".

 

Input:

IDRAT_1RAT_2RAT_3
1Positive  
2  Negative
3Indeterminate Positive
4   
5 Negative 
6  Positive
7   
9Positive  
10   

 

Output:

IDRAT_1RAT_2RAT_3Combined
1Positive  Positive
2  NegativeNegative
3Indeterminate PositivePositive
4   Not Tested
5 Negative Negative
6  PositivePositive
7   Not Tested
9Positive  Positive
10   Not Tested

 

Thanks!

7 REPLIES 7
Raj_Singh1
9 - Comet

Hi @gbufalino 

 

please see attached. let me know if this is the solution you are looking for? happy to make changes 🙂

Qiu
20 - Arcturus
20 - Arcturus

@gbufalino 
Can elaborate your logic here.

 


So, if column 1 is empty, then column 2. if column 2 is empty, then column 3. if all are empty, then "not tested".


It seems that ID 3 does not comply with above logic?

gbufalino
6 - Meteoroid

I ran this and my "combined" column only returned with "NOT TESTED". 

gbufalino
6 - Meteoroid

I'm not sure how to explain this, so I was hoping the input/output would help visually... there are only 4 possible test results:

Positive

Negative

Indeterminate

Not Tested

 

If a row has indeterminate, but also has positive/negative, I need the pos/neg value. 

If a row only has a single value (regardless of that value), I need that value.

If a row has no value, then it was "not tested".

Qiu
20 - Arcturus
20 - Arcturus

@gbufalino 

Thank you for the clarification

I have to assume that the Positive will prevail if positive/negative both present.

1114-gbufalino.PNG

gbufalino
6 - Meteoroid

This worked. Thanks so much!

Qiu
20 - Arcturus
20 - Arcturus

@gbufalino 

Thank you for the accept mark.

Labels