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 / Struggling to get 1 ga...
Power Apps
Answered

Struggling to get 1 gallery to show filtered results of the other gallery

(0) ShareShare
ReportReport
Posted on by 46

Hi,

 

I have 2 galleries, one showing a list of patients, and another showing a list of clinic details.

 

I'd like to be able to click on a clinic in the ClinicListGallery and show a list of patients in the PatientsGallery. Currently it's only showing me a list of patients who haven't got appointments. This is what I have so far:

 

Filter(Table1,DateValue('Registration Clinic Date')=DateValue(ClinicListGallery.Selected.StartDate, "dd/mm/yyyy"))

 

Any ideas? I'm fairly new to PowerApps

Categories:
  • Silvester. Akakpo Profile Picture
    783 on at

    Hello @RyanParker ,
    On the OnSelect property of the item in your ClinicListGallery, 

    Set(VarItem, ThisItem)

    Then , in the Items property of the second gallery where you want to show the results,

    Filter(Table1,DateValue('Registration Clinic Date')=DateValue(VarItem.StartDate, "dd/mm/yyyy"))


    Accept this as a solution if it works for you.

  • RyanParker Profile Picture
    46 on at

    Hi, thanks for your help but no luck.

     

    My patient list gallery is still showing a list of patient's who do not have appointment dates

  • Silvester. Akakpo Profile Picture
    783 on at

    I think we are not referencing the correct field for the filter function to work properly.
    What is the name of the patient list? Table 1? 
    Which field(s) in the Clinic List is(are) uniquely connected to the Patient list? 
    Or are you using a singular Table or Sharepoint List for both clinic and Patient?

  • RyanParker Profile Picture
    46 on at

    Everything gets pulled from Excel in two separate tables, a list of patients and a list of clinics.

    I've attached the format and structure of my data. Table 1 is patients, Table 2 is clinics. I'd like to be able to click on the first gallery (a list of all the clinics) and get a list of patients in the 2nd gallery as their "Registration Clinic Date" will match up with the StartDate of the clinic.

     

    It's worth noting I'm in the UK so formatting with the American defaults has been tricky.

  • Verified answer
    Silvester. Akakpo Profile Picture
    783 on at

    Alright @RyanParker , seen now.
    Use this code in the Items property of the Patients gallery where you want to show the results.

    Filter(Table1,DateValue('Registration Clinic Date')=DateValue(VarItem.StartDate))

    Accept this as a solution if it works for you

  • Verified answer
    C-Papa Profile Picture
    1,836 on at

    Hi, PowerApps is a bit tricky when dealing with dates from excel. i would try to not format the date to date, instead format them as string and then check if the string are the same e.g.

     

    Filter(Table1,'Registration Clinic Date' = ClinicListGallery.Selected.StartDate)

  • Silvester. Akakpo Profile Picture
    783 on at

    Hi @C-Papa , 
    Nice suggestion, but could be tricky if there is time added to the date or maybe incoherent date format.
    All the same, nice suggestion.

  • C-Papa Profile Picture
    1,836 on at

    In that case create a column in excel that looks up the clinic name based on the date, then change the filter to the clinic name which will be an exact match. Assuming you are working for the NHS you should get free access to SharePoint - this would be better handling this than excel. 

  • RyanParker Profile Picture
    46 on at

    Hi, thanks, it works. Our Trust has only just gotten M365 so it's slowly drip feeding the apps we get access to. We have SharePoint but I'm still trying to understand it myself.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 312

#3
Mohsin Ali Profile Picture

Mohsin Ali 252

Last 30 days Overall leaderboard