Forum Discussion
Elad_Magazanik
Nov 19, 2023Copper Contributor
Table transformation
Hi, does anyone have any idea on how to transform this table: To this table: Many thanks, Elad
PeterBartholomew1
Nov 19, 2023Silver Contributor
This uses basic dynamic array formulas to generate a table of indices
= LET(
n, ROWS(Table),
k, SEQUENCE(n),
k₀, FILTER(k, Table[Item Number]<>""),
k₁, VSTACK(DROP(k₀, 1) - 1, n),
idx, k₀ + {0,1,2,3,4},
items, INDEX(Table[Item Number], k₀),
pivot, IF(idx<=k₁, INDEX(Table[Location], idx), ""),
HSTACK(items, pivot)
)