Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Filter table based on another table lookup column

(1) ShareShare
ReportReport
Posted on by
Hi!
Consider the following scenario:
 
TABLE_A
Unique_A Info_A
A1 Peter
A2 Mary
A3 John
A4 Louis
 
TABLE_B
Unique_B Info_B LookUp_Unique_A
B1 345 A1
B2 789 A4
 
TABLES_B's 'LookUp_Unique_A' is a lookup column linked to TABLE_A
 
Is it possible to filter TABLE_A row's that are not linked in TABLE_B's 'LookUp_Unique_A'?
 
In the provided scenario the filter result should be
 
FILTERED TABLE_A
Unique_A Info_A
A2 Mary
A3 John
 
Tried 
Filter(TABLE_A; Not( Unique_A in AddColumns( TABLE_B; NewColumn; LookUp_Unique_A.Unique_A).NewColumn))
with no success
 
  • WarrenBelz Profile Picture
    WarrenBelz 145,422 on at
    Filter table based on another table lookup column
    The filter should be
    Filter(
       TableA,
       !(UniqueA in TableB.Lookup_Unique_A)
    )
     
    Please click Does this answer your question 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 a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn    Buy me a coffee
  • Ytalo Silva Profile Picture
    Ytalo Silva 41 on at
    Filter table based on another table lookup column
     
    Hello, my suggestion was to create a collection containing the requested information like this:
    ClearCollect(
        Table_A,
        {
            Unique_A: "A1",
            Info_A: "Peter"
        },
        {
            Unique_A: "A2",
            Info_A: "Mary"
        },
        {
            Unique_A: "A3",
            Info_A: "John"
        },
        {
            Unique_A: "A4",
            Info_A: "Louis"
        }
    );
    ClearCollect(
        Table_B,
        {
            Unique_B: "B1",
            Info_B: 345,
            LookUp_Unique_A: "A1"
        },
        {
            Unique_B: "B2",
            Info_B: 789,
            LookUp_Unique_A: "A4"
        }
    );
    ClearCollect(
        Table_C,
        Blank()
    );
    ForAll(
        Table_B,
        Collect(
            Table_C;
            LookUp(
                Table_A,
                Unique_A <> LookUp_Unique_A
            )
        )
    )
     
     
     
    I hope this helps!

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,422

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,711

Leaderboard