Forum Discussion
Matt_Paz
Feb 24, 2025Copper Contributor
Combining two columns into one ordered list
Hi all Problem trying to solve. I have a table of data like as follows: I know how to VSTACK, but how would I order by project and only repeat the project once with any matching rows in column...
PeterBartholomew1
Feb 26, 2025Silver Contributor
A couple of more exotic solutions
The first uses thunks to group the data by project before stacking and expanding the data.
= LET(
grouped, GROUPBY(task, responsibility, THUNK,,0),
responsibilityϑ, TAKE(grouped,,-1),
taskϑ, MAP(TAKE(grouped,,1), THUNK),
combinedϑ, TOCOL(HSTACK(taskϑ, responsibilityϑ)),
EVALTHUNKARRλ(combinedϑ)
)The second has less in the way of overkill
= LET(
project, MAP(task, LAMBDA(t, (t XLOOKUP(t, task, task)))),
TOCOL(HSTACK(project, responsibility),3)
)