web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter items that do n...
Power Apps
Unanswered

Filter items that do not have a corresponding record in another list

(0) ShareShare
ReportReport
Posted on by

I have a Sharepoint list of locations and a list of tracked items for those locations.

 

I am unsure which locations have a corresponding list of tracked items, so how can I filter a gallery of locations that have a corresponding tracked items record?  Basically showing me only locations that need to have a tracked items record created for it?

 

Sample data

 

Locations List 
IDName
0001Something
0002Nothing

 

Tracker List  
IDLookup to LocationsTracked task
00010001yes

 

How can I list all of the locations that do not have a corresponding tracking record in the "Tracker List"?  It would, in this case return 0002 (Nothing).

 

Thanks!

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,989 Moderator on at
    @Anonymous
    Please share some sample data from your list. Then show an example of what the filter should look like. By providing this specific information our forum members can give a better response.

    You can “fake” the data if it is confidential. The more important thing is to learn the structure of your data
  • Community Power Platform Member Profile Picture
    on at

    I posted the sample data to the original message.

  • WarrenBelz Profile Picture
    153,051 Most Valuable Professional on at

    Hi @Anonymous ,

    I will use names in blue - replace them with your names.

    Your Source data name is Tracked for the ones you are looking for.

    The column name in this is TrackedLocation

    The column in the main list Locations is Location

    So try this on the Items property for the gallery

    Filter(
     Locations,
     isBlank(
     Lookup(
     Tracked,
     TrackedLocation = Locations.Location,
     TrackedLocation
     )
     )
    )

    I have tried to keep this delegable. There is a less complex solution using In if you have a data source under 2000 records.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

  • mdevaney Profile Picture
    29,989 Moderator on at
    @Anonymous
    You can put it into a collection called itemsNotTracked like this. Collections can be used in the Items property of a gallery, a data table and in several other ways.

    ClearCollect(itemsNotTracked,
    Filter(
    AddColumns(
    ‘Locations List’,
    “AnyRecords”,
    !IsBlank(LookUp(‘Tracker List’, ‘Lookup to Locations’.Value = ‘Locations List’[@ID]),
    AnyRecords=false
    )
    )

    —-
    Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.
  • Community Power Platform Member Profile Picture
    on at

    Here's what code I'm trying to use.

    Filter(
     Clinics,
     IsBlank(
     LookUp(
     'Clinic Task Tracker',
     Clinic.Id = Clinics.ID,
     Clinic
     )
     )
    )

     

    I have a feeling I'm stuck on the "Clinic.Id = Clinics.ID" line.

     

    How can I fix this and also can you explain the in code?

  • WarrenBelz Profile Picture
    153,051 Most Valuable Professional on at

    Hi @Anonymous ,

    What is the matching field in Clinics and Clinic? It will not be the ID - is it "Lookup to Locations"? So maybe

    Filter(
     Clinics,
     IsBlank(
     LookUp(
     'Clinic Task Tracker',
     'Lookup to Locations' = ID,
     Clinic
     )
     )
    )

    will work - I m sure you will see you have to try to match values that should be there.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard