Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

General Discussions

Discuss any topics that are not product-specific here.

combining 2 fields based on different data in each

SuzanneMoore
5 - Atom

I have 2 rows for one user and need to take the data from field one from the second row and the data for field 2 from the first row. They have several other fields but they can be grouped. 

FAILRITM0481828
PassAGRI

 

So I want both to say Pass for field one and both to show RITM0481828 for field 2

3 REPLIES 3
Luke_C
17 - Castor
17 - Castor

Can you expand on the logic? The easy answer is a multi-row formula tool, however it would be helpful to know some more requirements to get you the best answer, things like:

 

  • Will all users in the data set have 2 rows? Is there logic that if any of the rows is 'pass' for a user they all should be?
  • Is there significance to the RITM0481828 that indicates it takes precedence over AGRI? Maybe can go on length, prefix = RITM, etc? 
ashleyharvey19
6 - Meteoroid

I’ve handled similar cases in Alteryx by using a formula tool with an IF or ISNULL logic to prioritize which field to use. Something like: IF ISNULL([Field1]) THEN [Field2] ELSE [Field1] ENDIF. It’s a clean way to merge columns when one might be blank. Works great in parsing messy inputs or when consolidating overlapping data sources.

anne789d
5 - Atom

@SuzanneMoore wrote:

I have 2 rows for one user and need to take the data from field one from the second row and the data for field 2 from the first row. They have several other fields but they can be grouped. 

FAILRITM0481828
PassAGRI

 

So I want both to say Pass for field one and both to show RITM0481828 for field 2


To consolidate the data, you need to first identify the two rows belonging to the same user. Then, extract the desired values—"Pass" from the first field of the second row and "RITM0481828" from the second field of the first row—and use these values to update both rows, ensuring both records have the same consistent data in those fields.

Labels
Top Solution Authors