cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Paxin
New Member

Filter a Gallery displaying items NOT in a second list.

Good Morning.

 

I am working on a Time Keeping Power App.  There is a requirement to allow the user to display those employees who have not yet created a time card for a specific month and year.  

 

There are 2 separate SharePoint lists being used. 

Employee - Includes an Employee_ID field

Time_Sheet - Includes an Employee_ID field, Month and Year

 

I have a gallery being populated by the Employee list.

 

I know I can use Filter(Employee, !(Employee_ID  in Time_Sheet .Employee_ID )), however this returns the employees who have never completed a time sheet.

 

I have tried to use 

Filter(Employee, Not(Employee_ID   in filter (
                                                                       Time_Sheet ,
                                                                       Year = 2021  && Month = "July",
                                                                       Employee_ID  
                                                            )
                               )
        )

 

but I am getting an error : Invocation of unknown or unsupported function.

 

How can I filter the Employee list to display only those employee who have not completed a time sheet for a specific month and year?

 

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
PG_WorXz10
Resident Rockstar
Resident Rockstar

Hi @Paxin,

 

Would mind trying the below code ?

 

Filter(Employee, !(Employee_ID  in Filter(Time_Sheet,Year = 2021  && Month = "July" ).Employee_ID )

View solution in original post

2 REPLIES 2
PG_WorXz10
Resident Rockstar
Resident Rockstar

Hi @Paxin,

 

Would mind trying the below code ?

 

Filter(Employee, !(Employee_ID  in Filter(Time_Sheet,Year = 2021  && Month = "July" ).Employee_ID )

View solution in original post

thanks for the quick response.  that worked

 

Except

)) should be at the very end not just )

 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,407)