Forum Discussion
Anonymous
4 years agoNot applicable
Count Distinct by Grouping
Hi, This is a very simple thing but I cant seem to get to the bottom of it. I need to create a measure that gives me the count distinct by a grouping. For example TableA Group Attributes...
- 4 years ago
Anonymous , Try a measure
calculate(distinctcount(Table[Attributes]), filter(allselected(Table), Table[Group] = max(Table[Group] ) ) )
AlexisOlson
4 years agoSuper User
smpa01 Is there a reason for the iterators rather than writing this?
CALCULATE ( DISTINCTCOUNT ( t2[Attributes] ), ALLEXCEPT ( t2, t2[Group] ) )
smpa01
4 years agoCommunity Champion
AlexisOlson great..skipped my mind.