Forum Discussion
matthewtjy
5 years agoHelper I
Cumulative Distinct Count by Year
Hi, I've used the measure "Measure = CALCULATE(DISTINCTCOUNT(DATA TO COUNT),FILTER(ALLSELECTED(DATA_TABLE),(DATA DATE)<=MAX(DATA_DATE)))" to plot a cumulative graph. For example's sake, I've simp...
- Anonymous5 years ago
Sorry, had wrong braces. Try:
Measure = CALCULATE(DISTINCTCOUNT([Data Column]),FILTER(ALL(Table),[Year Column]<=MAX([Year Column])&& [COLOR]<>"BLUE"))
Paul
Anonymous
5 years agoNot applicable
Sorry, had wrong braces. Try:
Measure = CALCULATE(DISTINCTCOUNT([Data Column]),FILTER(ALL(Table),[Year Column]<=MAX([Year Column])&& [COLOR]<>"BLUE"))
Paul
- matthewtjy5 years agoHelper I
Thank Paul! This works like a charm!
Just to check, if i need to include extra filters e.g. "Material" is not "Plastic", i could just add on a filter as such correct?
Measure = CALCULATE(DISTINCTCOUNT([Data Column]),FILTER(ALL(Table),[Year Column]<=MAX([Year Column])&& [COLOR]<>"BLUE"&& [MATERIAL]<>"Plastic"))