How to compare one row to others in DAX in Excel

1

I have this table which has foreign keys from several other keys:

enter image description here

Basically, this table shows which students registered in which module run by which teacher in what term.

I want to query the following:

How many students have registered for more than one module run by a given tutor?

It will look something like this:

enter image description here

For example, Vasiliy Kuznetsov runs two modules: FunPro and NO. If one student registers for both of them, he is counted as one.

My sql oriented mind is telling me this: Count all the rows in which student_id and tutor_id are the same. For example, in one row student_id is 5 and tutor_id is 10, and the same is true for the third row. Then, I count it as one.

How can I do that with DAX formulas?

Jahongir Rahmonov

Posted 2015-12-08T10:52:42.153

Reputation: 111

No answers