I have a dataset that is variable in size however number of headers remains same.
1) If user gives the Field and Source, then it should look into the To Field and To Source and get the From Field and From Source
2) Now again the latest information that we have from From Field and From Source, it will look again into the To Field and To Source and get the relevant From Field and From source
3) This look should go on till we don't get the information in To Field and To Source.
Note: It should be Inner Join (Both fields (Field and Source should match between "To" and "From")
Number of layers or numbers of loops it will be variable in the datasets.
For Eg, If we have the below datasets:
From Field | From Source | To Field | To Source |
ABC | Final v1 | ABC | Final |
ABC5 | Final v2 | ABC | Final v1 |
ABC6 | Initial 2 | ABC5 | Final v2 |
ABC | Initial 1 | ABC6 | Initial 2 |
JKL1 | Final v1 | JKL | Final |
JKL1 | Final v2 | JKL1 | Final v1 |
JKL12 | Final v3 | JKL1 | Final v2 |
JKL12 | Initial 1 | JKL12 | Final v4 |
JKL | Initial 2 | JKL12 | Initial 1 |
I am expecting the below output:
Field | Source | From Field | From Source | From Field 1 | From Source 1 | From Field 2 | From Source 2 | From Field 3 | From Source 3 | From Field 4 | From Source 4 |
ABC | Final | ABC | Final v1 | ABC5 | Final v2 | ABC6 | Initial 2 | ABC | Initial 1 | NA | NA |
JKL | Final | JKL1 | Final v1 | JKL1 | Final v2 | JKL12 | Final v3 | JKL12 | Initial 1 | JKL | Initial 2 |
Above two columns highlighted in blue it will be given or taken as the reference.
Please let me know if this can be possible within Alteryx.
Solved! Go to Solution.
This is possible with Iterative macros. I may be able to throw something together tomorrow or someone else can jump in and handle it.
This is very similar to the Weekly Challenge problem: https://community.alteryx.com/t5/Weekly-Challenge/Challenge-12-Creating-an-HR-Hierarchy/td-p/36740
Regardless of whether I can be of further help or someone else can, Happy Solving!!!
Thanks Andrew! Will try the same.
User | Count |
---|---|
18 | |
14 | |
10 | |
6 | |
6 |