Skip to content

Instantly share code, notes, and snippets.

@PBI-DataVizzle
Forked from matthews-p/ConcatRows.txt
Created November 29, 2024 19:43
Show Gist options
  • Save PBI-DataVizzle/19d7ee68e54a1eb2f53a3ac3000d1ee5 to your computer and use it in GitHub Desktop.
Save PBI-DataVizzle/19d7ee68e54a1eb2f53a3ac3000d1ee5 to your computer and use it in GitHub Desktop.
ConcatRows
/** ConcatRows */
/*
FUNCTION NAME: ConcatRows
DESCRIPTION: For a rectangular array (including table refs), returns
a dynamic array 1 column wide and n rows tall, concatenating the
values from each row
ARGS:
rng: The source range to be concatenated
delim: The delimiter to be used
skipblanks: In each row's concatenation, TRUE skips blank
values and FALSE includes blank values
EXAMPLE:
=ConcatRows(MyTable[#All],"|",FALSE)
*/
ConcatRows = LAMBDA(
rng,
delim,
skipblanks,
BYROW(
rng,
LAMBDA(
r,
TEXTJOIN(delim,skipblanks,r)
)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment