Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Filtering table based on multiple values

Hello PowerApps Community,


I am building a ticketing system app in powerapps, we already have the databases set up in Oracle. I am able to successfully connect to the oracle database and see all the tables.


Currently, the tables are broken down as follows:


Table 1 - Tickets - all tickets are stored here, with the Department ID number.

Table 2 - Departments - here departments are linked to helpdesk techs (by email). One department will have primary techs and backup techs. One tech can have multiple departments to support.


I have managed to filter the department's table to show only departments assigned to the logged-in tech. Now I need to filter the tickets table based on the filtered department's table for that tech. I cannot figure it out. I have used galleries, collections, and data tables to display the "assigned departments" (dept ID number)  then tried to filter the tickets table based on those values. It can only filter based on the selected record of the gallery, not all records in the gallery.


I have created a collection to grab the assigned department IDs then tried to filter gallery pulling tickets using:

Filter('[TICKET]',HD_DEPTS in collection.HD_DEPTS_ID) but no luck   -- HD_DEPTS is the department ID


Any help is appreciated.




Dual Super User III
Dual Super User III

Re: Filtering table based on multiple values

Hey @haddad 


Can you share more details about the schema and the implementation you have used to store the department id into the collection. Please make sure that the department id column exists in the collection.


Here is a sample implementation that you can use to modify based on your case:

To get Department Id:


ClearCollect(MyCollection, Filter(Departments, techs = User().Email))

To get the tickets:

Filter('[TICKET]',HD_DEPTS in MyCollection.HD_DEPTS_ID)


Hope this Helps!


If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Frequent Visitor

Re: Filtering table based on multiple values

Hello @yashag2255 , 


Thank you for your reply! Please see below for the DB schema.


schema.PNGI am able to filter Table 2 based on the TechID (Current User logged in). I tried it in galleries and in collection, it displays Dept_IDs assigned to current logged in tech.



But when I take that result and try to filter Table 1 tickets based on the Dept_IDs, nothing returns. If I specify a single department, the filter works.

I tried the following but no result, eventhough mycollection displays Dept_IDs assigned to me

Filter('[TICKET]',HD_DEPTS in MyCollection.DEPTS_ID)


Say me, tech ID 1 is assigned depts 6-20.  There are many tickets in the tickets DB assigned to departments 1-500. Id like it to filter only the tickets of my assigned departments: 6-20. It has no problem showing for one value but it seems like it is struggling to filter based on multiple values? or I am missing something here.


Below is a screenshot of my app:


Thank you in advance for any help!





Helpful resources


New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,188)