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 / Filtering option of a ...
Power Apps
Unanswered

Filtering option of a Datatable OR gallery

(0) ShareShare
ReportReport
Posted on by

Good afternoon,

 

To put in context my main table has a list of employees (each items) and i have over 90 columns wich represent a task that has to be performed. In each column I have entered if a person has the position currently to do this task, has experience doing it or is N/A.

 

On one of my page I want to be able to filter my datatable in order to see the name of the employee and only the column with the task selected by a dropdown list. To do this i simple added a formula on the dropdown list saying that if 'task 1' is selected, than column task 1 is visible, else it is not.

 

Now the issue is I want to filter said datatable so that when column task 1 or task 2 ( depending on wich one selected by the dropdown menu) is selected, the filter applied on the table's item is such that only the people that currently hold the position or with experience appear and not the N/A one? How can I dynamically change the filter formula to reflect this? I tried having a combo box or dropdown selection with the same name that the columns but it will not work.

 

Best Regards,

 

 

Categories:
  • cwebb365 Profile Picture
    3,334 Most Valuable Professional on at

    The only thing I can think of since I don't think you can dynamically pick column names in filters etc. Is to utilize Switch. 

     

    Switch
    ( 
     ColumnTaskDropdown.Selected.Value, 
     "Task1", Filter( Datatable, Task1 = 'Hold' || Task1 = 'Experience'),
     "Task2", Filter(Datatable, Task2 = 'Hold' || Task2 = 'Experience),
     "Task3", Filter(Datatable, Task3 = 'Hold' || Task2 = 'Experience),
     "Task4", Filter(Datatable, Task4 = 'Hold' || Task2 = 'Experience)
    ) 

     

     

    And so forth. Will be a big statement, but it should work just fine. Obviously, you can tweak the filter some, but this is the quick way to get it working. 

     

    If you need the Task part to be connected to another filter / dropdown you can do: 

    Switch
    ( 
     ColumnTaskDropdown.Selected.Value, 
     "Task1", Filter( Datatable, Task1 = DropdownorFilter.Selected.Value && Task1 <> 'N/A'),
     "Task2", Filter(Datatable, Task2 = DropdownorFilter.Selected.Value) && Task1 <> 'N/A',
     "Task3", Filter(Datatable, Task3 = DropdownorFilter.Selected.Value) && Task1 <> 'N/A',
     "Task4", Filter(Datatable, Task4 = DropdownorFilter.Selected.Value) && Task1 <> 'N/A',
    ) 

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 360 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 325

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard