Forum Discussion
felipevaz
Helper I
6 years agoDistinct Count If Rows are duplicate in certains conditions
Hi folks, Please, I have a table like this Category1 Client A 1 B 1 B 2 A 3 A 4 B 4 Distinct Count of Client 4 Distinct Count of Client only if Categor...
OwenAuger
Super User
6 years agoHi felipevaz
Something like this should do what you want:
Distinct Count of Client only if Category1 has different values =
COUNTROWS (
FILTER (
VALUES ( YourTable[Client] ),
CALCULATE ( DISTINCTCOUNT( YourTable[Category1] ) ) > 1
)
)
Regards,
Owen
- felipevaz6 years ago
Helper I
Thank you Owen
It works well, but when I need to filter the Category1 the measure does not represent the right behavior. Like, if I select Category1 = A the measure does not distinct count the cases.
May I use booth cases in the same measure?
Distinct count Client by A cases OR
Distinct count Client by B cases OR
Distinct count Client by AB cases OR
Distinct count Client independently