Forum Discussion
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
9 Replies
- amitchandakSuper 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() ) )
- AnonymousNot applicable
Hi Amit, I also need a drill down report to show the users details. Will this approach work then?
- AnonymousNot applicable
There's a separate table but your if statement is not working.
- Ashish_MathurSuper User
Hi,
Please share some data to work.
- AnonymousNot applicable
Enrollments (there are many columns which are related to course level)
Email Course Title start date status [email protected] abc 9/12/21 in progress users report (contains all the users)
email reporting department office job title [email protected] Audit Sydney Manager [email protected] IT QLD Partner 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.
- Ashish_MathurSuper User
Hi,
So if you select abc in the slicer, then in the resultant table, you want the result to be [email protected]. 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.
- AnonymousNot 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