Forum Discussion
yogi_new
Jan 08, 2024Copper Contributor
Help on data for preparing relationship mapping between two columns
Hello Experts, Greetings for the day! I've below scenario in excel where I need help/guidance from you in getting the solution. In below table, I've table number given in first column. The tabl...
- Jan 08, 2024
Hi yogi_new
With Excel 365/Web:
=LET( Parents, FILTER(Table[Heading], Table[Category]="parent"), HasChild, UNIQUE( FILTER(Table[Dependent Heading], Table[Dependent Heading]<>"") ), Mapped, DROP( REDUCE("", HasChild, LAMBDA(seed,v, VSTACK(seed, TEXTJOIN(",",,v,FILTER(Table[Heading],Table[Dependent Heading]=v)))) ), 1 ), NoChild, FILTER(Parents, ISNA(XMATCH(Parents,HasChild))), Splitted, TEXTSPLIT( TEXTJOIN(";",, TEXTJOIN(";",,NoChild), TEXTJOIN(";",,Mapped)), ",", ";",,,"" ), Sorted, SORTBY(Splitted, XMATCH(CHOOSECOLS(Splitted,1),Parents)), VSTACK( HSTACK("Parent", "Child " & SEQUENCE(,COLUMNS(Splitted)-1)), Sorted ) )
Lorenzo
Jan 09, 2024Silver Contributor
On reflection... it's actually the same need/requirement as How to filter and get data from multiple rows for matching criteria so the same approach/formula can be re-used. See in attached file