Forum Discussion
Nigelbloomy
5 years agoFrequent Visitor
Distinct count group by specific columns
I am trying to create a measure (I don't have access to the dataset) to get a distinct count of status, by grouping year and ID. I also only want to count statuses selected by the user. I need to k...
Nigelbloomy
5 years agoFrequent Visitor
This seems to work but I haven't tested it much. It would be annoying to add any extra columns to the all function. It would be more robust if you could specify the year and ID as the level of grouping.
CALCULATE(DISTINCTCOUNT(Data[Investment Status]), ALLSELECTED(Data[Investment Status]), ALL(Data[Investment Name]))