Forum Discussion
ulahh
Jan 08, 2024Copper Contributor
Listing rows based on unique column data.
For simplicity sake, I have a 4 column sheet. Brand, Product, Salesman, Sales period. I want to list all row data for: Unique brands sold AND unique brand & product sold AND (if multiple br...
SergeiBaklan
Aug 01, 2024Diamond Contributor
With formula, assuming you are on Excel 365
=LET(
uBrands, UNIQUE(Sales[[Brand]:[Product]]),
uBrand, CHOOSECOLS(uBrands,1),
uProduct, CHOOSECOLS(uBrands,2),
minPeriod, MINIFS(
Sales[period],
Sales[Brand], uBrand,
Sales[Product], uProduct),
flag, XMATCH(
Sales[Brand] & "|" & Sales[Product] & "|" & Sales[period],
uBrand & "|" & uProduct & "|" & minPeriod ),
VSTACK(
Sales[#Headers],
FILTER(Sales, IFNA(flag, 0) ) )
)