Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ImPalaBI
Helper I
Helper I

Filter users that did not attended certain courses

I have a table with users and courses, I want to filter the users that did not attended certain courses (so I can send them an email).

 

My data looks like this:

STUDENTCOURSES TAKEN
ACourse 1
ACourse 2
BCourse 1
BCourse 2
BCourse 3
CCourse 1

 

How can I get a list of students that attended Course 1 and Course 2, but did not attended Course 3? In my example table the result will be only Student A.

Also, it would be possible to have a slicer or filter where I can select different courses and get a filtered table? For example a list of students that attended Course 1, but not Courses 2 or 3.  In my example table the result will be only Student C.

Thanks in advance

1 ACCEPTED SOLUTION
v-kelly-msft
Community Support
Community Support

Hi @ImPalaBI ,

 

Create a measure as below:

Measure = 
var _table=CALCULATETABLE(VALUES('Table'[COURSES TAKEN]),FILTER(ALL('Table'),'Table'[STUDENT]=MAX('Table'[STUDENT])))
Return
IF("Course 1&Course 2"=CONCATENATEX(_table,[COURSES TAKEN],"&"),MAX('Table'[STUDENT]),BLANK())

And you will see:

Screenshot 2020-11-02 122335.png

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

View solution in original post

3 REPLIES 3
v-kelly-msft
Community Support
Community Support

Hi @ImPalaBI ,

 

Create a measure as below:

Measure = 
var _table=CALCULATETABLE(VALUES('Table'[COURSES TAKEN]),FILTER(ALL('Table'),'Table'[STUDENT]=MAX('Table'[STUDENT])))
Return
IF("Course 1&Course 2"=CONCATENATEX(_table,[COURSES TAKEN],"&"),MAX('Table'[STUDENT]),BLANK())

And you will see:

Screenshot 2020-11-02 122335.png

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

NamishB
Post Prodigy
Post Prodigy

Hi @ImPalaBI - Can you not use Slicer Visual and under selection Control turn off the Multi-select with CTRL?

NamishB_0-1603924703214.png

 

Hope this helps.

 

Cheers,

-Namish B

 

Thanks for the reply,

But this won´t help, if a student has taken all Courses, it will appear on all combinations of the Slicer Visual. In the example image you sent, only Student A should appear.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.