cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
stapes
Level: Powered On

Can I add a Filter on a Data table column in a canvas app?

I have built a simple app that displays a data table from an sql stored procedure. I want to be able to filter on one or two of the columns. I have seen this suggested, and added it to the OnSelect Action for a Data Data Column, but it has no affect when I run the app:

 

SortByColumns(newCollection,"attendance",Descending)

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Can I add a Filter on a Data table column in a canvas app?

@stapes 

Hi there!  The FILTER function should be used in the Items function of a Data Table (not the column).  Here's an example of a filter with multiple conditions.  You can use as few or many conditions as you like.

 

Filter(newCollection,yourColumnName1 = "sometext", yourColumnName2 > 1000)

 

If you need further help be sure to supply some specific requirements of your app 🙂

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

3 REPLIES 3
Super User
Super User

Re: Can I add a Filter on a Data table column in a canvas app?

@stapes 

You can filter a datasource using the FILTER function.  See here for the official MS Docuementation: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-filter-lookup

 

If you need more guidance please share the specific requirements of your task.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

 

stapes
Level: Powered On

Re: Can I add a Filter on a Data table column in a canvas app?

Thanks mdevaney. Not sure where I apply that. The documentation does not say. Where do I add these filter functions? In my Flow? In my Canvas App?

Super User
Super User

Re: Can I add a Filter on a Data table column in a canvas app?

@stapes 

Hi there!  The FILTER function should be used in the Items function of a Data Table (not the column).  Here's an example of a filter with multiple conditions.  You can use as few or many conditions as you like.

 

Filter(newCollection,yourColumnName1 = "sometext", yourColumnName2 > 1000)

 

If you need further help be sure to supply some specific requirements of your app 🙂

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,220)