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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

How to do dynamic left anti join?

Hi, 

I want to perform dynamic left anti join in powerbi. I have an erollment table in which i have user's emails and courses in which users are enrolled in and i have second table called users in which i have data of all the users (such as email, name and personal details). Now i want to find the users which are not enrolled in a course and the value should change according to the course i select in a slicer.
So basically, if i select a course in slicer. the user table and enrollment table should perform left anti join and get the emails which are in the users table but are not in enrollment table for that particular course. 

Thanks 

1 ACCEPTED SOLUTION

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

9 REPLIES 9
Anonymous
Not applicable

Hi @Anonymous,

Did Ashish_Mathur 's suggestions help with your scenario? if that is the case, you can consider Kudo or accept his suggestions to help others who faced similar requirements.

If that also doesn't help, please share more detailed information to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Ashish_Mathur
Super User
Super User

Hi,

Please share some data to work.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Enrollments (there are many columns which are related to course level)

EmailCourse Titlestart datestatus
layal@gmail.comabc9/12/21in progress

 

users report (contains all the users)

emailreporting departmentofficejob title
layal@gmail.comAuditSydneyManager
layal2@gmail.comITQLDPartner

 

The logic is if an user is enrolled in any course, the email of that user will be there in enrollment report. If not, then the user is not enrolled. 

Hi,

So if you select abc in the slicer, then in the resultant table, you want the result to be layal2@gmail.com.  Am i correct?  Share some more rows of data in both tables.  Also, there should be a third table which should list down all courses.  Share that as well.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi, Thats correct. I don't have any other table its just the enrollment reports it mostly contains all the courses. 

EmailCourse TitleStart DateStatus
layal@gmail.comabc Not started
123@gmail.comabc9/12/21completed
layal2@gmail.comxyz10/1/21completed
layal@gmail.com xyz Not started

 

Emailreporting departmentofficeJob title
layal@gmail.comAuditNSWManager
layal2@gmail.comIT QLDAdmin
123@gmail.comITNSWIT
234@gmail.com TaxVICtax

 

So if i select abc course in slicer I should see layal2@gmail.com and 234@gmail.com users who are not enrolled. 

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

@Anonymous , Check for use opted for that course. But need a separate usee table for that

 

Enrolled = countrows(enrollment )

 

not enrolled =if(isblank(countrows(enrollment ) ) , User[user], blank() )

 

not enrolled count = countx(values(User[user]),  if(isblank(countrows(enrollment ) ) , User[user], blank() )  )

 

 

 

 

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

There's a separate table but your if statement is not working. 

Anonymous
Not applicable

Hi Amit, I also need a drill down report to show the users details. Will this approach work then?

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors