Forum Discussion
PaulPalkowski
Helper II
6 years agoCount rows from filtered measure
I have tried and tried to look for a solution, and didn't find anything that wasn't confusing. I must be over thinking this... Here is my data, it's so very simple...only one column named Animal, wi...
- 6 years ago
Try this measures...
Single_Occurrence = VAR A = SUMMARIZE('Table (2)','Table (2)'[Animal],"Count1",COUNT('Table (2)'[Animal])) RETURN CALCULATE(COUNT('Table (2)'[Animal]),FILTER(a,[Count1]=1))Multiple_Occurrence = VAR A = SUMMARIZE('Table (2)','Table (2)'[Animal],"Count1",COUNT('Table (2)'[Animal])) RETURN CALCULATE(COUNT('Table (2)'[Animal]),FILTER(a,[Count1]>1))If it helps, mark it as a solution
Kudos are nice too
PPalkowski
Helper II
6 years agoThank you so very much, the first formula, works wonderful and returns 3 as expected, the second formula returns 13 and not 6. I am trying to get the count of the unique animals that are listed more than once. In this case, 6 is the count I am looking for.
VasTg
Memorable Member
6 years ago
Replace the count with distinctcount in the return statement.
Multiple_Occurrence =
VAR A = SUMMARIZE('Table (2)','Table (2)'[Animal],"Count1",COUNT('Table (2)'[Animal]))
RETURN CALCULATE(DISTINCTCOUNT('Table (2)'[Animal]),FILTER(a,[Count1]>1))
If it helps mark it as a solution
Kudos are nice too
- VasTg6 years ago
Memorable Member
If I answered your question please mark it as a solution to close the topic.
- PPalkowski6 years ago
Helper II
EXCELLENT!!!
Thank you so much..
hmmm, how to I mark this a 'the' solution...
😁
- VasTg6 years ago
Memorable Member
- PPalkowski6 years ago
Helper II
I don't see anything