Forum Discussion
Need Assistance with DAX Measure: Filtering Students by Selected Classes
Mr_Robot0092 , Try like
M1 = distinctcount(Table[Subject])
M2 = calculate(distinctcount(Table[Subject]), removefilters(Table[Subject]) )
Student with allselected = countX(Values(Table[Student]), if([M1] = [M2], [Student], blank()) )
or refer, if needed
And for Selected Values, All selected values are present: https://youtu.be/X5T4rIZovHk
Hello amitchandak ,
thanks for replying.
Doesn't give me the right result like i want . I want to create a measure that counts only the students who are enrolled in the selected classes and have not been enrolled in any other classes outside of the selected ones.
Example :
i filtered on class Math & German , the result show me 4 students for each Class . As bellow the selected value :
Merida Math Merida German Ajay Math Ajay German Patrick Math John German Fabio Math Fabio German
In my case i want to retrive 2 students for each Class .(Count only Student Merida,Patrick and John)
Why ?
The student Ajay and Fabio have more than 2 classes that was filtered :
Ajay Math Ajay German Ajay English Fabio Math Fabio German Fabio English Fabio Computer
I want to remove all the students who have more classes and non selected on filter
Thanks for help !