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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter Collection base...
Power Apps
Answered

Filter Collection based on time column compared to other rows time column

(0) ShareShare
ReportReport
Posted on by 21

I have an app that is used to schedule healthcare appointments. All appointments that are available to be booked are called "open slots". I get all the open slots and store them into a collection. The columns in this collection are appointment type, date, duration, start time, location, and provider type (MD, ANRP, RN, etc....).

 

There is certain criteria where a patient needs to be scheduled for back to back appointments. For that case, I have two galleries. Gallery A is showing the Open Slots collection. Gallery B shows a filtered open slots collection but it will only show the open slots where the time is directly after the first open slot selected and at the same location. 

 

For example: If I select the open slot for Tuesday, 3/22/2022 at 10:00AM (20 minutes in duration) in Gallery A, then I only want to show open slots for Tuesday 3/22/2022 at 10:20AM (20 minutes in duration) open slot in Gallery B. I have this portion working correctly. 

 

The area I am having trouble with is Gallery A shows all open slots. I would like to filter out open slots in Gallery A where there is not an open slot available directly after. 

 

etuell_1-1647896182168.png

 

etuell_2-1647896191777.png

 

Any ideas on how I can filter Gallery A to not show open slots that don't have an open slot after it?

 

I thought about adding a column to the Open Slots collection to indicate if there was an open slot directly after it. If so, then the column value would be true, if not, then false. Then I could display all Open Slots where the new column value is true. Not quite sure how to do that though. Any help or ideas would be greatly appreciated. Thanks.

 

 

 

Categories:
  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @etuell,

    Do you define the 'Appt Type' as "FLIP In Person" to represent an open slot  that is not available?

     

    If so, I think you could directly filter the Gallery as below:

    Filter(CollectionName,!('Appt Type'="FLIP In Person"))

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard