The EndsWith function in Power Apps is used to check if a text string ends with a specific sequence of characters. It’s commonly used to filter data based on text that appears at the end of a string in a column or field.
Syntax:
EndsWith(Text, EndText)
- Text: The text string or field you’re checking.
- EndText: The sequence of characters you want to match at the end of the string.
This function is useful for situations where you need to filter or validate data that has a consistent ending, such as filtring the email domains (e.g., “gmail.com”, “yahoo.com”), file extensions (e.g., “.pdf”, “.jpeg”) etc.
Example of using EndsWith function
As you can see, we have a Gallery control here displaying employee details. This Gallery is connected to a SharePoint list data source named ‘Employee Info’.

Let’s use the EndsWith function to filter the gallery records based on file extensions (e.g., .pdf, .jpeg) entered in the text input box.
Let’s go to Items property of Gallery and write the below formula.
If(  txt_search.Text <> "",  Filter(    'Employee Info',    EndsWith(      'Doc type',      txt_search.Text    )  ),  'Employee Info' )
In the above formula, the EndsWith function checks whether the values in the ‘Doc type’ column end with the characters entered in the search box txt_search.
Let’s enter file extension in the search box to see how the EndsWith function works.
When you type ‘.jpeg’ into the search box, the gallery filters and displays all employees who have uploaded documents in the .jpeg format.

Delegation Consideration:
EndsWith function may trigger delegation warnings when used with large data sources like SharePoint, SQL, or Dataverse.
In such cases, Power Apps may process only a limited set of records locally, potentially leading to incomplete results.
Also Read..
- Filter function in Power Apps
- LookUp function in Power Apps
- ShowColumns function in Power Apps
- Concat function in Power Apps
- StartsWith in Power Apps
![]()
