We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Match, fill and create records

Pramod91
8 - Asteroid

Hello everyone, I am new to alteryx.
I have two excel sheets. Here is an example,

 

Sheet 1

MedicinePhaseUnique IDSubsequent IDDiseasePatient GroupLine of Therapy
a11721Lung Cancer in adults, children or elderlyAdults1st
a11721Lung Cancer in adults, children or elderlyAdults1st
a11722Lung Cancer in adults, children or elderlyChildren1st
a11722Lung Cancer in adults, children or elderlyChildren1st
a11723Lung Cancer in adults, children or elderlyElderly1st
a11723Lung Cancer in adults, children or elderlyElderly1st
c1451Tuberculosis in adultsAdults1st
c1451Tuberculosis in adultsAdults1st

 

Sheet 2

MedicinePhaseUnique IDSubsequent IDDiseaseAge GroupLine of Therapy
b2  Lung Cancer in adults, children or elderly--
b2  Lung Cancer in adults, children or elderly--
d2  Tuberculosis in adults--

 

What I need to do is in the sheet 2 if the disease matches with that in sheet 1, then the columns of Unique Id, Subsequent Id, patient group and line of therapy should be filled as per the data in sheet 1.

Also, if the disease matches and there is a Subsequent Id greater than 1 in the sheet 1 then for that disease in sheet 2, records should be created as per the subsequent Id of sheet 1 with all the columns.

 

Can anyone help me to tackle this?

6 REPLIES 6
bpatel
Alteryx Alumni (Retired)

hi @Pramod91 ,

 

could you please share what your final output should look like?

Pramod91
8 - Asteroid

Hi bpatel,

 

Thanks for coming back to me. The output I need is - The sheet 2 should be updated like this

 

MedicinePhaseUnique IDSubsequent IDDiseaseAge GroupLine of TherapyStatus
b21721Lung Cancer in adults, children or elderlyAdults1stFilled taking reference from sheet 1
b21721Lung Cancer in adults, children or elderlyAdults1stFilled taking reference from sheet 1
d2451Tuberculosis in adultsAdults1stFilled taking reference from sheet 1
b21722Lung Cancer in adults, children or elderlyChildren1stRecord Created and filled taking reference from sheet 1
b21722Lung Cancer in adults, children or elderlyChildren1stRecord Created and filled taking reference from sheet 1
b21723Lung Cancer in adults, children or elderlyElderly1stRecord Created and filled taking reference from sheet 1
b21723Lung Cancer in adults, children or elderlyElderly1stRecord Created and filled taking reference from sheet 1
grazitti_sapna
17 - Castor

Hi @Pramod91,

 

Below is my attempt to solve your problem:

 

Join_Problem.png

 PFA Workflow.

I hope it solves your issue.

Sapna Gupta
AlanSchaeffer
6 - Meteoroid

Hi,
I don't really understand why there's only 1 row with tuberculosis in the output, since there's two of them in sheet1. Is it because the subsequentID is set to 1 and in sheet2 there's only 1 row with tuberculosis ?

Thanks for the clarification,
Alan

Pramod91
8 - Asteroid

@Alan,

 

Yes, as there is only one row for tuberculosis in sheet 2 and in sheet 1 it has subsequent Id 1 so it will just fill the values in other columns as that in sheet 1 and not create any new record. Had there been multiple subsequent Ids for Tuberculosis in sheet 1 it would have created new record for those subsequent Ids and fill the other columns matching against those subsequent Ids.

Pramod91
8 - Asteroid

@grazitti_sapna,

 

Thank you so much. This solves my issue.

Labels
Top Solution Authors