Forum Discussion
Formulas Challenge for 365
Patrick2788 I am not happy with the array of array limitations but Thunks can be used to overcome the problem in many instances. The attached workbook contains a Lambda function
= Expandλ(arrayϑ)
which turns a column of row-thunks back into a 2D array. I would far prefer such tricks were not necessary but it is something I have been bitching about for years (along with array breakup that is now solved by Lambda helper functions).
Expandλ = LAMBDA(ϑ,
LET(
n₁, ROWS(ϑ),
n₂, MAX(MAP(ϑ,Columnsλ)),
MAKEARRAY(n₁,n₂,
LAMBDA(i₁,i₂,
INDEX(INDEX(ϑ,i₁,1)(),i₂)
)
)
)
);
Columnsλ = LAMBDA(xϑ,COLUMNS(xϑ()));
Thunkλ = LAMBDA(x, LAMBDA(x));Microsoft Word - Will modern Excel finally change the way Models are built v2.0.docx (eusprig.org)
If it is any use to you, I could also offer Lambda functions that read multidimensional data from an arbitrary cross-tab dataset (I have only gone to 4D but there is no reason why it should not be applied to higher dimensional data were that relevant). The second Lambda function uses the first and generates a normalised dataset or will generate any of the normal pivot table crosstabs. It is also possible to aggregate a column by addition.