cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Blinkorta
Frequent Visitor

Have each record from table A added to table C if it is not found in table B?

I'm trying to have a table show all records from another table that aren't found in a third table. Using the image as a reference...The application is an inventory tracking app. Currently as items are scanned they are recorded in the "Scanned" table. If items are in the inventory but 

PowerApps.JPGare not scanned they show up in the "Missing" table. The third table I want to show all items that are scanned but not found as entries in the inventory. 

 

So, as in the question, I'm looking for each record from "Scanned" not found in "Inventory" to be added to the currently undefined table at the end.

 

I figured a ForAll was my best answer but I can't seam to figure it out. 

 

1 ACCEPTED SOLUTION

Accepted Solutions
CarlosFigueira
Power Apps
Power Apps

You can use the Filter function with the in operator to do that if the item can be identified by a column (such as a primary key, or an identifier). For example, if the value you're showing in your example is from a column called 'Id' in your tables, then this expression will return a table with the missing items:

Filter(
    Inventory,
    Not(Id in Scanned.Id))

View solution in original post

2 REPLIES 2
CarlosFigueira
Power Apps
Power Apps

You can use the Filter function with the in operator to do that if the item can be identified by a column (such as a primary key, or an identifier). For example, if the value you're showing in your example is from a column called 'Id' in your tables, then this expression will return a table with the missing items:

Filter(
    Inventory,
    Not(Id in Scanned.Id))

View solution in original post

That was surprisingly simple. Thank you!

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,258)