Reputation: 544
I have a large table with students test results, and I've been trying to find a way to make a DISTINCTCOUNT measure from two differents tests, but I've completely failed and have found no help from searching.
Heres an example table: Example table
The measures that I am using and are working:
Number of students = DISTINCTCOUNT('FACT'[StudentID])
Student below par T10 = CALCULATE([Number of students];'FACT'[TestID]="T10";'FACT'[Result]<4)
Student below par T11 = CALCULATE([Number of students];'FACT'[TestID]="T11";'FACT'[Result]<12)
I am trying to make a DISTINCTCOUNT that counts distinct students from below par T10 AND below par T11. Expected result with the test data set is 2, or 1 for students bb and ff. I tried using CALCULATE with &&, but didn't work.
Upvotes: 0
Views: 54
Reputation: 11625
Please try this approach:
Below Par Students = SUMX(
VALUES('FACT'[StudentID]),
IF(
[Student below par T10] > 0
&& [Student below par T11] > 0,
1
)
)
Upvotes: 1