Forum Discussion
Anonymous
5 years agoNot applicable
Dax Help
Good Afternoon I have a combined table in power BI relating to student results in a recent data drop. I have a column of subject names for example English Language, Mathematics etc. i then have ...
Markus_Re
5 years agoResolver I
Hi, Anonymous
I hope this will be able to help you:
I created a table that looks like this:
so in this case, as far as i understood, the count for your case would be 2 (John & Max).
For counting i used this Measure:
MathsAndEnglishAbove4 =
var _filteredTable = FILTER(StudentGrade, (StudentGrade[Subject] = "Mathematics" && StudentGrade[Grade] >= 4) || (StudentGrade[Subject] = "English" && StudentGrade[Grade] >= 4))
var _groupedTable = GROUPBY(_filteredTable, Student[StudentID], "count", COUNTX(CURRENTGROUP(), StudentGrade[StudentID]))
var _result = COUNTX(FILTER(_groupedTable, [count] >= 2), [count])
RETURN
_result
Best regards,
Markus
Did I answer your question? Mark my post as a solution!