Forum Discussion
Need Assistance with DAX Measure: Filtering Students by Selected Classes
Hello Ashish_Mathur ,
Thanks for replying.
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.
Hope is clear
Hi,
You may download my PBI file from here.
Hope this helps.
- Mr_Robot00923 years ago
Helper I
Hello Ashish_Mathur
Thanks for replying.
Your solution doesn't answer to my question.
The idea is display a table with Class and Cout of student Like as bellow :
i filtered on class Math & German :
Class CountStudent MAth 2 German 2 Thanks for your help !
- Ashish_Mathur3 years ago
Super User
Hi,
Shouldn't the answer be 3? John, Merida and Patrick. Each one of them has take either only German or only Math or only Both German and Math
- Mr_Robot00923 years ago
Helper I
Hi Ashish_Mathur ,
Sure John, Merida and Patrick are the good answer.
But in my case i have a table with a Class dimension and count Student the result will be like as bellow :
Class CountStudent Math 2 German 2