23 Power Apps Filter Function Examples For SharePoint
The Power Apps Filter function checks a table for any records matching a set of logical criteria. Then it extracts the results into a new table. Use these examples to help you filter a SharePoint list. All of the filter functions on this page support delegation so the full results set will be returned.
Table of Contents
• Filter A SharePoint Text Column In Power Apps
◦ Text Column Equals
◦ Text Column Starts With
◦ Text Column Is Blank
• Filter A SharePoint Number Column In Power Apps
◦ Number Column Is Greater Than Or Less Than
◦ Number Column Is Greater Than Or Equal To/Less Than Or Equal To
◦ Number Column Does Not Equal
◦ Number Column Is Between Two Values
• Filter A SharePoint Date Column In Power Apps
◦ Date Column Equals Current Date
◦ Date Column Equals A Specific Date
◦ Date Column Is Between Two Dates
◦ Date Columns Date Range Includes Date
• Filter A SharePoint Yes/No Column In Power Apps
◦ Yes/No Column Equals Yes
◦ Yes/No Column Equals No
• Filter A SharePoint Choice Column In Power Apps
◦ Choice Column Equals
• Filter A SharePoint LookUp Column In Power Apps
◦ LookUp Column ID Equals
◦ LookUp Column Value Equals
• Filter A SharePoint Person Column In Power Apps
◦ Person Column Equals Current User
◦ Person Column Equals User Name
◦ Person Column Equals User Email
• Additional Examples
◦ AND Logical Operator
◦ OR Logical Operator
◦ NOT Logical Operator
◦ Multiple Logical Operators
Filter A SharePoint Text Column In Power Apps
Text Column Equals
Input:
Inventory SharePoint List
ID | Title | Manufacturer |
1 | Dishwasher | LG |
2 | Freezer | Samsung |
3 | Kitchen Faucet | Kohler |
4 | Kitchen Sink | American Standard |
5 | Refrigerator | Samsung |
6 | Stove |
Code:
Get records where the Manufacturer column equals Samsung
Filter(Inventory, Manufacturer ="Samsung")
Output:
ID | Title | Manufacturer |
2 | Freezer | Samsung |
5 | Refrigerator | Samsung |
Text Column Starts With
Input:
Inventory SharePoint List
ID | Title | Manufacturer |
1 | Dishwasher | LG |
2 | Freezer | Samsung |
3 | Kitchen Faucet | Kohler |
4 | Kitchen Sink | American Standard |
5 | Refrigerator | Samsung |
6 | Stove |
Code:
Get records where the Title column starts with “Kitchen”
Filter(Inventory, StartsWith(Title, "Kitchen"))
Output:
ID | Title | Manufacturer |
3 | Kitchen Faucet | Kohler |
4 | Kitchen Sink | American Standard |
Text Column Is Blank
Input:
Inventory SharePoint List
ID | Title | Manufacturer |
1 | Dishwasher | LG |
2 | Freezer | Samsung |
3 | Kitchen Faucet | Kohler |
4 | Kitchen Sink | American Standard |
5 | Refrigerator | Samsung |
6 | Stove |
Code:
Get records where the Manufacturer column is blank
Filter(Inventory, Manufacturer=Blank())
Output:
ID | Title | Manufacturer |
6 | Stove |
Filter A SharePoint Number Column In Power Apps
Number Column Is Greater Than Or Less Than
Input:
Inventory SharePoint List
ID | Title | InStock |
1 | Dishwasher | 9 |
2 | Freezer | 14 |
3 | Kitchen Faucet | 7 |
4 | Kitchen Sink | 10 |
5 | Refrigerator | 15 |
6 | Stove | 13 |
Code:
Get records where the InStock column is greater than 10
Filter(Inventory, InStock > 10)
Output:
ID | Title | InStock |
2 | Freezer | 14 |
5 | Refrigerator | 15 |
6 | Stove | 13 |
Number Column Is Greater Than Or Equal To/Less Than Or Equal To
Input:
Inventory SharePoint List
ID | Title | InStock |
1 | Dishwasher | 9 |
2 | Freezer | 14 |
3 | Kitchen Faucet | 7 |
4 | Kitchen Sink | 10 |
5 | Refrigerator | 15 |
6 | Stove | 13 |
Code:
Get records where the InStock column is less than or equal to 10
Filter(Inventory, InStock <= 10)
Output:
ID | Title | InStock |
1 | Dishwasher | 9 |
3 | Kitchen Faucet | 7 |
4 | Kitchen Sink | 10 |
Number Column Does Not Equal
Input:
Inventory SharePoint List
ID | Title | InStock |
1 | Dishwasher | 9 |
2 | Freezer | 14 |
3 | Kitchen Faucet | 7 |
4 | Kitchen Sink | 10 |
5 | Refrigerator | 15 |
6 | Stove | 13 |
Code:
Get records where the InStock column does not equal 9
Filter(Inventory, InStock <> 9)
Output:
ID | Title | InStock |
2 | Freezer | 14 |
3 | Kitchen Faucet | 7 |
4 | Kitchen Sink | 10 |
5 | Refrigerator | 15 |
6 | Stove | 13 |
Number Column Is Between Two Values
Input:
Inventory SharePoint List
ID | Title | InStock |
1 | Dishwasher | 9 |
2 | Freezer | 14 |
3 | Kitchen Faucet | 7 |
4 | Kitchen Sink | 10 |
5 | Refrigerator | 15 |
6 | Stove | 13 |
Code:
Get records where the InStock column is between 5 and 10
Filter(Inventory, InStock >= 5 And InStock <= 10)
Output:
ID | Title | InStock |
1 | Dishwasher | 9 |
3 | Kitchen Faucet | 7 |
4 | Kitchen Sink | 10 |
Filter A SharePoint Date Column In Power Apps
Date Column Equals Current Date
Input:
Inventory SharePoint List
ID | Title | LastSoldDate |
1 | Dishwasher | 2/16/2023 |
2 | Freezer | 2/18/2023 |
3 | Kitchen Faucet | 3/1/2023 |
4 | Kitchen Sink | 3/4/2023 |
5 | Refrigerator | 2/23/2023 |
6 | Stove | 3/6/2023 |
Code:
Assuming the current date is March 6, 2023, get records where the LastSoldDate column equals today
Filter(Inventory, LastSoldDate = Today())
Output:
ID | Title | LastSoldDate |
6 | Stove | 3/6/2023 |
Date Column Equals A Specific Date
Input:
Inventory SharePoint List
ID | Title | LastSoldDate |
1 | Dishwasher | 2/16/2023 |
2 | Freezer | 2/18/2023 |
3 | Kitchen Faucet | 3/1/2023 |
4 | Kitchen Sink | 3/4/2023 |
5 | Refrigerator | 2/23/2023 |
6 | Stove | 3/6/2023 |
Code:
Get records where the LastSoldDate column equals March 1, 2023
Filter(
Inventory,
LastSoldDate = Date(2023, 3, 1)
)
Output:
ID | Title | LastSoldDate |
3 | Kitchen Faucet | 3/1/2023 |
Date Column Is Between Two Dates
Input:
Inventory SharePoint List
ID | Title | LastSoldDate |
1 | Dishwasher | 2/16/2023 |
2 | Freezer | 2/18/2023 |
3 | Kitchen Faucet | 3/1/2023 |
4 | Kitchen Sink | 3/4/2023 |
5 | Refrigerator | 2/23/2023 |
6 | Stove | 3/6/2023 |
Code:
Get records where the LastSoldDate column is between March 1, 2023 and March 31, 2023
Filter(
Inventory,
LastSoldDate >= Date(2023, 3, 1)
And LastSoldDate <= Date(2023, 3, 31)
)
Output:
ID | Title | LastSoldDate |
6 | Stove | 3/6/2023 |
Date Columns Date Range Includes Date
Input:
Inventory SharePoint List
ID | Title | PromotionStartDate | PromotionEndDate |
1 | Dishwasher | 2/14/2023 | 2/28/2023 |
2 | Freezer | 2/20/2023 | 3/5/2023 |
3 | Kitchen Faucet | 2/24/2023 | 3/17/2023 |
4 | Kitchen Sink | 3/11/2023 | 3/18/2023 |
5 | Refrigerator | 3/15/2023 | 3/31/2023 |
6 | Stove | 3/17/2023 | 4/2/2023 |
Code:
Get records where the PromotionStartDate column and the PromotionEndDate column includes March 1, 2023
Filter(
Inventory,
PromotionStartDate <= Date(2023, 3, 1)
And PromotionEndDate >= Date(2023, 3, 1)
)
Output:
ID | Title | PromotionStartDate | PromotionEndDate |
2 | Freezer | 2/20/2023 | 3/5/2023 |
3 | Kitchen Faucet | 2/24/2023 | 3/17/2023 |
Filter A SharePoint Yes/No Column In Power Apps
Yes/No Column Equals Yes
Input:
Inventory SharePoint List
ID | Title | OnSale |
1 | Dishwasher | Yes |
2 | Freezer | No |
3 | Kitchen Faucet | No |
4 | Kitchen Sink | No |
5 | Refrigerator | Yes |
6 | Stove | No |
Code:
Get records where the OnSale column equals Yes
Filter(Inventory, OnSale = true)
Output:
ID | Title | OnSale |
1 | Dishwasher | Yes |
5 | Refrigerator | Yes |
Yes/No Column Equals No
Input:
Inventory SharePoint List
ID | Title | OnSale |
1 | Dishwasher | Yes |
2 | Freezer | No |
3 | Kitchen Faucet | No |
4 | Kitchen Sink | No |
5 | Refrigerator | Yes |
6 | Stove | No |
Code:
Get records where the OnSale column equals No
Filter(Inventory, OnSale = false)
Output:
ID | Title | OnSale |
2 | Freezer | No |
3 | Kitchen Faucet | No |
4 | Kitchen Sink | No |
6 | Stove | No |
Filter A SharePoint Choice Column In Power Apps
Choice Column Equals
Input:
Inventory SharePoint List
ID | Title | OrderStatus |
1 | Dishwasher | Ordered |
2 | Freezer | Ordered |
3 | Kitchen Faucet | Not Ordered |
4 | Kitchen Sink | Discontinued |
5 | Refrigerator | Ordered |
6 | Stove | Not Ordered |
Code:
Get records where the OrderStatus column equals “Ordered”
Filter(Inventory, OrderStatus.Value = "Ordered")
Output:
ID | Title | OrderStatus |
1 | Dishwasher | Ordered |
2 | Freezer | Ordered |
5 | Refrigerator | Ordered |
Filter A SharePoint LookUp Column In Power Apps
LookUp Column ID Equals
Input:
Inventory SharePoint List
ID | Title | Manufacturer |
1 | Dishwasher | LG |
2 | Freezer | Samsung |
3 | Kitchen Faucet | Kohler |
4 | Kitchen Sink | American Standard |
5 | Refrigerator | Samsung |
6 | Stove |
Manufacturers SharePoint List
ID | Title |
1 | LG |
2 | Samsung |
3 | Kohler |
4 | American Standard |
Code:
Get records from the Inventory table where the Manufacturer column ID equals 2
Filter(Inventory, Manufacturer.ID = 2)
Output:
ID | Title | Manufacturer |
2 | Freezer | Samsung |
5 | Refrigerator | Samsung |
LookUp Column Value Equals
Input:
Inventory SharePoint List
ID | Title | Manufacturer |
1 | Dishwasher | LG |
2 | Freezer | Samsung |
3 | Kitchen Faucet | Kohler |
4 | Kitchen Sink | American Standard |
5 | Refrigerator | Samsung |
6 | Stove |
Manufacturers SharePoint List
ID | Title |
1 | LG |
2 | Samsung |
3 | Kohler |
4 | American Standard |
Code:
Get records from the Inventory table where the Manufacturer column value equals “Kohler”
Filter(Inventory, Manufacturer.Value = "Kohler")
Output:
ID | Title | Manufacturer |
3 | Kitchen Faucet | Kohler |
Filter A SharePoint Person Column In Power Apps
Person Column Equals Current User
Input:
Inventory SharePoint List
ID | Title | Buyer |
1 | Dishwasher | Matthew Devaney |
2 | Freezer | Sarah Green |
3 | Kitchen Faucet | Matthew Devaney |
4 | Kitchen Sink | David Johnson |
5 | Refrigerator | David Johnson |
6 | Stove | Alice Lemon |
Code:
Assuming the current user is Matthew Devaney, get records from the Inventory table where the Buyer column equals the current user
Filter(Inventory, Buyer.Email = User().Email)
Output:
ID | Title | Manufacturer |
1 | Dishwasher | Matthew Devaney |
3 | Kitchen Faucet | Matthew Devaney |
Person Column Equals User Name
Input:
Inventory SharePoint List
ID | Title | Buyer |
1 | Dishwasher | Matthew Devaney |
2 | Freezer | Sarah Green |
3 | Kitchen Faucet | Matthew Devaney |
4 | Kitchen Sink | David Johnson |
5 | Refrigerator | David Johnson |
6 | Stove | Alice Lemon |
Code:
Get records from the Inventory table where the Buyer column user name equals “Sarah Green”
Filter(Inventory, Buyer.'Display Name' = User().Name)
Output:
ID | Title | Manufacturer |
2 | Freezer | Sarah Green |
Person Column Equals User Email
Input:
Inventory SharePoint List
ID | Title | Buyer |
1 | Dishwasher | Matthew Devaney |
2 | Freezer | Sarah Green |
3 | Kitchen Faucet | Matthew Devaney |
4 | Kitchen Sink | David Johnson |
5 | Refrigerator | David Johnson |
6 | Stove | Alice Lemon |
Code:
Get records from the Inventory table where the Buyer column email [email protected]
Filter(Inventory, Buyer.Email = "[email protected]")
Output:
ID | Title | Manufacturer |
4 | Kitchen Sink | David Johnson |
5 | Refrigerator | David Johnson |
Additional Examples
AND Logical Operator
Input:
Inventory SharePoint List
ID | Title | Manufacturer | OnSale |
1 | Dishwasher | LG | Yes |
2 | Freezer | Samsung | No |
3 | Kitchen Faucet | Kohler | No |
4 | Kitchen Sink | American Standard | No |
5 | Refrigerator | Samsung | Yes |
6 | Stove | No |
Code:
Get records from the Inventory table where the manufacturer column “Samsung” and the OnSale column equals Yes.
Filter(Inventory, Manufacturer="Samsung" And OnSale = true)
Output:
ID | Title | Manufacturer | OnSale |
5 | Refrigerator | Samsung | Yes |
OR Logical Operator
Input:
Inventory SharePoint List
ID | Title | Manufacturer | OnSale |
1 | Dishwasher | LG | Yes |
2 | Freezer | Samsung | No |
3 | Kitchen Faucet | Kohler | No |
4 | Kitchen Sink | American Standard | No |
5 | Refrigerator | Samsung | Yes |
6 | Stove | No |
Code:
Get records from the Inventory table where the manufacturer column “Samsung” or the OnSale column equals Yes.
Filter(Inventory, Manufacturer="Samsung" Or OnSale = true)
Output:
ID | Title | Manufacturer | OnSale |
1 | Dishwasher | LG | Yes |
2 | Freezer | Samsung | No |
5 | Refrigerator | Samsung | Yes |
NOT Logical Operator
Input:
Inventory SharePoint List
ID | Title | Manufacturer | OnSale |
1 | Dishwasher | LG | Yes |
2 | Freezer | Samsung | No |
3 | Kitchen Faucet | Kohler | No |
4 | Kitchen Sink | American Standard | No |
5 | Refrigerator | Samsung | Yes |
6 | Stove | No |
Code:
Get records from the Inventory table where the manufacturer column is not “LG.”
Filter(Inventory, Not Manufacturer="LG")
Important note: the NOT operator does not support delegation. Use the <> equals operator instead. |
Output:
ID | Title | Manufacturer | OnSale |
2 | Freezer | Samsung | No |
3 | Kitchen Faucet | Kohler | No |
4 | Kitchen Sink | American Standard | No |
5 | Refrigerator | Samsung | Yes |
6 | Stove | No |
Multiple Logical Operators
Input:
Inventory SharePoint List
ID | Title | Manufacturer | OnSale |
1 | Dishwasher | LG | Yes |
2 | Freezer | Samsung | No |
3 | Kitchen Faucet | Kohler | No |
4 | Kitchen Sink | American Standard | No |
5 | Refrigerator | Samsung | Yes |
6 | Stove | No |
Code:
Get records from the Inventory table where the manufacturer column equals “Samsung” and OnSale equals Yes or the manufacturer column equals LG
Filter(Inventory, (Manufacturer="LG" And OnSale="Yes") Or Manufacturer="LG")
Output:
ID | Title | Manufacturer | OnSale |
1 | Dishwasher | LG | Yes |
5 | Refrigerator | Samsung | Yes |
Did You Enjoy This Article? 😺
Subscribe to get new Power Apps articles sent to your inbox each week for FREE
Questions?
If you have any questions or feedback about 23 Power Apps Filter Function Examples For SharePoint please leave a message in the comments section below. You can post using your email address and are not required to create an account to join the discussion.
Hello Matthew,
Looks like a small mistake up in the second example ‘Text Column Starts With ‘ where it says Samsung in stead of Kitchen.
Keep up to good work and thanks for the time and effort you are putting in to this.
Paulo
Paulo,
Great catch! I’ve fixed the article. Thanks for reporting 🙂
Great post, a small issue I see: Get records where the InStock column does not equal 9. Then is this formale correct?
Wei,
I appreciate your comment. I’ve fixed it now thanks to you 🙂
Matthew thank you for being a creator that stays with the restrictions most of us operate under. There are so many content creators all going “dataverse can do this and that”. Our organizations are not paying for these premium options so I’m pleased that one of the best publishers of PowerApps guides still remembers those of us who are in the Sharepoint List ‘only’ world.
Duncan,
You’re welcome. I believe this approach is what has led to the blog’s success.
Fun fact: I work with Dataverse everyday in my job. However, I chose to blog SharePoint since it would appeal to the largest possible audience.
Hello,
Some of the links are not working on this page
I get a 404 error
Tim,
Fixed. Thanks for reporting!
Hi Matthew,
Is the Yes/No column filter function correct for NO? (think it should be false in second example)
Also, the Person.Email vs User().Email might not work in some org. The User().Email returns the User Principal Name and the Person.Email might have a different value.
UPN can be found thou in Person.Claims property.
Maybe it is worth to mention that as consideration.
As always good work and please keep it up 🙂
Ps. Funny thing is that Power Apps for a longer moment did not work well with the filtering of boolean column 🙁
Regards
Dawid
Dawid,
I’ve updated the ‘no’ example to false. Thanks 🙂
I wish there was a way to filter text saying text contains “xyz” which isn’t delegable.
Richard,
I wish it did too. At least I came up with a good workaround that gets the full results set. But one wonders why it can’t be included in Power Apps if you can do it in the SharePoint REST API?
https://www.matthewdevaney.com/power-apps-search-a-sharepoint-list-no-delegation-warning/
Richard,
You can do it. But a Power Automate flow is needed.
https://www.matthewdevaney.com/power-apps-search-a-sharepoint-list-no-delegation-warning/
Wonderful article. Your content is very helpful and actionable!
Tyler,
I appreciate you taking the time to leave me a nice comment. Thank you 🙂
hello moekotte,
I have started learning power app and I come across a problem. Before explaining the problem I want to give you some context.
On my power app i have created a form which is linked with Microsoft list so that every new response can be saved in the list. This form have different types of data like drop down, true false, text, number.
Now on the other page of the same app, I have displayed the list using DataTable.
Problem:
I want to add a Text Input where users can search any type of data, example: If there is a drop down where users can choose locations and that drop down have 3 options (Delhi, Mumbai, Chennai), so the user can search for Delhi and get all the rows with the selected option Delhi.
I also have done some work with the help of filter option but it is not working,
This is the formula that I have used:
Filter(‘Interview Request’,
Text(Title, “@”) in SearchInput.Text ||
Text(‘Hiring Department’, “@”) = ‘Hiring Department_Column2’.Selected.Value ||
Text(‘Manager ID’, “[$-en-US]0”) in SearchInput.Text ||
Text(‘Experiance’, “@”) in SearchInput.Text ||
Text(Location, “@”) in SearchInput.Text
)
Please help me with this problem.
Thankyou
I have a gallery with a SharePoint list data source. If a filter on the gallery’s items returns no records I’d like to set a variable to true. The following is in the gallery’s Items property.
If the current user’s email does not match the email in any records none should be returned. This works fine but if no records are returned I’d like to set a variable to true. Not sure how to do that. THANK YOU!
If(!varIsAppAdmin,
Sort(
Filter(
‘Deployment Requests’,
‘E-Mail’ = varCurrentUser.Email
),
Created,
SortOrder.Descending
),
Sort(‘Deployment Requests’,Created,SortOrder.Descending)
)
Mike,
You could put IsEmpty(GalleryName.AllItems) in a toggle and set a variable OnChange.
Hi Matthew,
Filter with <> is not delegable right.
can you please me know the workaround for this?
Fareed,
Correct. Filtering with does not equal is not delegable. There is no known workaround for it.
Can you filter two columns with the same value except the matching
Id: ParentID:
0001. 0001. Exclude
0002. 0003 exclude
0003. 0001. Include
i cannot filter a table vs a text. Please show me