I'm trying to create a lambda function to search and return all matching data from my datamodel, currently I have the following function:
LAMBDA(Table, SearchValue, SearchColumn, ReturnColumn, [ValueIfError],
LET(
Query, CUBEMEMBER(
"ThisWorkbookDataModel",
"([" & Table& "].[" & SearchValue& "].&[" & SearchColumn & "],[" & Table& "].[" & ReturnColumn & "].Children)"
),
IF(ISOMITTED(ValueIfError), Query, IFERROR(Query; ValueIfError))
)
And it works perfectly, however, it only works when there is one an just one matching reference in the search table. I wish to return an array of all matching values, is that possible?
-Update-
I found a workaround using CUBERANKEDMEMBER, which allows me to indicate which index of the returning array I want to fetch, this is not exactly what I want because I wish to perform my own operations on that return array, but is something I can work with in the meantime.