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 brand & product sold) for the first period its sold in.
So, from this: to this:
| Brand | Product | Salesman | period | Brand | Product | Salesman | period | |
| Alpha | rope | Joe | 23 | Alpha | rope | Joe | 23 | |
| Alpha | string | Joe | 12 | Alpha | string | Joe | 12 | |
| Alpha | rope | Bob | 25 | |||||
| Alpha | cord | Nikki | 24 | Alpha | cord | Nikki | 24 | |
| Bravo | shield | Joe | 11 | Bravo | shield | Joe | 11 | |
| Bravo | knife | Brandon | 24 | Bravo | knife | Brandon | 24 | |
| Charlie | vest | Brandon | 33 | Charlie | vest | Brandon | 33 | |
| Delta | vest | Sheila | 2 | Delta | vest | Sheila | 2 | |
| Echo | eardrum | Rodney | 2 | Echo | eardrum | Rodney | 2 | |
| Echo | eardrum | Joe | 2 | Echo | eardrum | Joe | 2 | |
| Foxtrot | tail | Bob | 4 | Foxtrot | tail | Bob | 4 | |
| Golf | ball | Bob | 6 | |||||
| Golf | ball | Jack | 5 | Golf | ball | Jack | 5 |
4 Replies
- SergeiBaklanDiamond 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) ) ) ) - SergeiBaklanDiamond Contributor
- peiyezhuBronze Contributor
- SergeiBaklanDiamond Contributor