Alteryx Designer Desktop Discussions

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

Match null data in same column based on unique ID

wboyle
5 - Atom

Hello,

 

I've done this before but can't seem to wrap my brain around it this time and have not had success looking around the forums/google.

 

A scrubbed snapshot of my data set is below.  I am comparing data entered against codes in 2 different systems. System A has the Department and Department Name fields, while System B does not.  I am trying to say that when Department and Department Name are null, find the matching Employee Name and fill in the null value based on the record that does have the department info.

 

I have a larger workflow that gives me this existing output, so maybe it makes sense to queue something up before the data sets are joined instead of doing this after the join?

 
MonthSystem A Project CodeSystem B Project CodeCodes Match?Employee NameSystem A HoursSystem B HoursHours Difference (A - B)DepartmentDepartment Name
April 2020CODE1CODE1TRUEEmployee 116160DEPT ADEPT A
April 2020CODE2CODE2TRUEEmployee 12438-14DEPT ADEPT A
April 2020CODE 3CODE 3TRUEEmployee 1810-2DEPT ADEPT A
April 2020CODE4CODE4TRUEEmployee 1112118-6DEPT ADEPT A
April 2020CODE5CODE5TRUEEmployee 1440DEPT ADEPT A
April 2020CODE6CODE6TRUEEmployee 1440DEPT ADEPT A
April 2020CODE7CODE7TRUEEmployee 1880DEPT ADEPT A
April 2020CODE8CODE8TRUEEmployee 1440DEPT ADEPT A
April 2020CODE9CODE9TRUEEmployee 146-2DEPT ADEPT A
April 2020CODE10CODE10TRUEEmployee 146-2DEPT ADEPT A
April 2020CODE11CODE11TRUEEmployee 146-2DEPT ADEPT A
April 2020CODE12CODE12NO MATCHEmployee 124024DEPT ADEPT A
February 2020CODE13CODE13TRUEEmployee 1440DEPT ADEPT A
February 2020CODE14CODE14TRUEEmployee 11127240DEPT ADEPT A
February 2020CODE15CODE15TRUEEmployee 146-2DEPT ADEPT A
February 2020CODE16CODE16TRUEEmployee 12858-30DEPT ADEPT A
February 2020CODE17CODE17TRUEEmployee 11222-10DEPT ADEPT A
February 2020CODE18CODE18NO MATCHEmployee 108-8  
February 2020CODE19CODE19NO MATCHEmployee 108-8  
February 2020CODE20CODE20NO MATCHEmployee 108-8  
February 2020CODE21CODE21NO MATCHEmployee 108-8  
February 2020CODE22CODE22NO MATCHEmployee 108-8  
February 2020CODE23CODE23NO MATCHEmployee 108-8  
February 2020CODE24CODE24NO MATCHEmployee 108-8  
February 2020CODE25CODE25NO MATCHEmployee 108-8  
February 2020CODE26CODE26NO MATCHEmployee 108-8  
7 REPLIES 7
RobertOdera
13 - Pulsar

Hi, @wboyle 

 

I feel that your sample file doesn't subscribe to the use case you've described 🙂

However, from my best understanding:

 

1. Somewhere in your flow (assuming an employee can only be in one Dept, Dept Name), generate a list of unique employee ID, employee Name, Dept, Dept Name

2. Later in your flow, use the Find and Replace Tool to update the null with the appropriate Dept, Dept Name

 

Cheers!

wboyle
5 - Atom

Thanks @RobertOdera for the response.

 

In regards to my use case with the sample table, this is all for 1 employee.  The bottom 10 rows have nulls for Department and Department Name.  I'm trying to Find where the 2 Dept fields are null and replace with the 2 Dept fields where Employee Name matches.  I'm playing around with the Find and Replace tool now, but so far don't see how it will work yet.

wboyle
5 - Atom

@RobertOdera - Find and Replace did work! I just didn't know how to use it.  My co-worker suggested putting a true false filter in front of it and that got me going.  Thanks again!

RobertOdera
13 - Pulsar

Hi, @wboyle 

 

RNO2_0-1590784598445.png

 

RobertOdera
13 - Pulsar

Just seeing this now, @wboyle 

Glad you worked it out!

RobertOdera
13 - Pulsar

Hi, @wboyle 

 

Alternative, leaner, approach given your specific use case.

Please also mark as an acceptable solution and like, if this works for you!

 

RNO2_0-1590785252657.png

 

Multi-Row Tool config to update Dept

*The group by selection is just in case you ever have more than one unique employee

RNO2_1-1590785358849.png

 

 

RobertOdera
13 - Pulsar

Thank you @wboyle !

I appreciate your follow up and feedback!

Cheers!

Labels