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 / RemoveIf with multiple...
Power Apps
Answered

RemoveIf with multiple conditions

(1) ShareShare
ReportReport
Posted on by 11
I have 2 tables 
CollectA
RefID-A Date-A
13 07/29/2024
13 07/30/2024
13 07/31/2024
8 07/29/2024
8 07/30/2024
8 07/31/2024
3 07/29/2024
3 07/30/2024
3 07/31/2024
 
CollectB
RefID-B Date-B
13 07/29/2024
8 07/30/2024
 
I want to remove all rows from CollectA that match CollectB and there isn't a matching ID or Key so i need to compare both RefID and Date.  This is what I'd like Collect A to look like after:
.
CollectA
RefID-A Date-A
13 07/30/2024
13 07/31/2024
8 07/29/2024
8 07/31/2024
3 07/29/2024
3 07/30/2024
3 07/31/2024
 
Here is what my RemoveIf statement looks like:
 
            RemoveIf(CollectA, RefID-A = Lookup(CollectB,RefID-B = RefID-A).RefID-B, Date-A = Lookup(CollectB,Date-B = Date-A).Date-B)
 
This is what the CollectA table looks like this after: 
CollectA
RefID-A Date-A
13 07/31/2024
8 07/31/2024
3 07/29/2024
3 07/30/2024
3 07/31/2024
 
I've also tried RemoveIf(CollectA, RefID-A = Lookup(CollectB,RefID-B = RefID-A).RefID-B && Date-A = Lookup(CollectB,Date-B = Date-A).Date-B) but had the same results
 
Any ideas on how to re-write this?  
Categories:
I have the same question (0)
  • Verified answer
    lizveck Profile Picture
    11 on at
    I figured it out, or at least 1 way to do it.  I Added a column to both tables that was a combined field of both the RefID and the Date that i called unique. This gave me a single field to match. So my updated Removeif was
     
    RemoveIf(CollectA, Unique-A= Lookup(CollectB,Unique-B = Unique-A).Unique-B))

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