Forum Discussion
Brian_Paasch
Nov 22, 2021Brass Contributor
counting unique values after multiple filters
I've found many examples that come really close to what I need, but not quite right... I need to count how many unique locations contain a part after doing multiple filters for the specific part. I'v...
- Nov 22, 2021Got it! I have multiple variations of the "return" state. BUT, they all start with the word "return". So I added a LEFT to that last step, i.e. LEFT(Table1[state],6)="return"), and that did the trick! Thanks again!
HansVogelaar
Nov 22, 2021MVP
Enter red in G2, light in H2 and return in I2.
Formula in J2:
=SUM(--(LEN(UNIQUE(FILTER(Table1[location],(Table1[part]=G2)*(Table1[variety]=H2)*(Table1[state]=I2),"")))>0))
Source:Count unique values with criteria
See the attached version.
It would also be possible to use a pivot table for this (you have to add the source range to the Data Model)
Brian_Paasch
Nov 22, 2021Brass Contributor
Thanks! This looks really helpful. Still struggling a bit using wild cards. Say if I needed to use "retu*" in place of your using cell I2 containing the word "return". That seems to break something. But I'm pretty sure I'll get around that. Thanks again, this was hugely helpful!