Forum Discussion
Anonymous
4 years agoNot applicable
How to Count Unique Customers Based on Only Having Specific Values
Hello, I'm new to Power BI and can't wrap my head around this. I attached a sample table closely related to what I'm trying to figure out. Table1 Customer Name Food Group Aaron Fruit...
- 4 years ago
ryan_mayu
Super User
4 years agoAnonymous
you can try this
Measure = DISTINCTCOUNT('Table'[Customer Name])- CALCULATE(DISTINCTCOUNT('Table'[Customer Name]),FILTER('Table','Table'[Food Group]="Meat"))
Measure 2 =
VAR TBL=DISTINCT(FILTER('Table','Table'[Food Group]="Meat"))
VAR tbl2=ADDCOLUMNS(TBL,"CHECK",CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[Customer Name]=[Customer Name])))
RETURN COUNTROWS(FILTER(tbl2,[CHECK]<>1))