Forum Discussion
JustinDoh1
5 years agoPost Prodigy
Exclude distinct count with OR
I am trying to write DAX formula with following logic: Count distinct "ClientID" if one has "Refused" in Consent column, BUT, if one has "Consented" in Consent column, do not count (exclude) dis...
- 5 years ago
Ok, thanks for clarifying.
Refused Not Consented = VAR Refused = DISTINCT ( SUMMARIZE ( FILTER ( 'Table', 'Table'[Consent] = "Refused" ), 'Table'[ClientID] ) ) VAR Consented = DISTINCT ( SUMMARIZE ( FILTER ( 'Table', 'Table'[Consent] = "Consented" ), 'Table'[ClientID] ) ) RETURN COUNTROWS ( EXCEPT ( Refused, Consented ) )Regards
JustinDoh1
5 years agoPost Prodigy
Jos_Woolley Thank you for your explanation. Now I understand what 'Except' does in DAX.
Jos_Woolley
5 years agoSolution Sage
You're welcome!
Regards