-
-
Save PBI-DataVizzle/360d1389c9599671023430d8b4a70d44 to your computer and use it in GitHub Desktop.
DistinctList
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** DistinctList */ | |
/* | |
FUNCTION NAME: DistinctList | |
DESCRIPTION: Given a n-row by 1-column range of concatenated text, | |
returns a n-row by 1-column array of the unique values. Not | |
sorted (use DistinctListSort to get sorted list) | |
ARGS: | |
rng: Range holding original values | |
delim: Delimiter used to split the concatenated strings | |
col: Column index you want returned (1st column = 1) | |
EXAMPLE: | |
=DistinctList(A1:A1000,"|",4) | |
*/ | |
DistinctList = LAMBDA( | |
rng, | |
delim, | |
col, | |
UNIQUE( | |
BYROW( | |
rng, | |
LAMBDA( | |
r, | |
INDEX( | |
TEXTSPLIT( | |
r, | |
delim | |
), | |
col | |
) | |
) | |
) | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment