RemoveIf(
DataSource,
Condition1,
Condition2,
...
)
- DataSource: The table or data source from which you want to remove records.
- Condition1, Condition2, …: Logical conditions that specify which records should be removed. Each condition should evaluate to true or false.
Here, we have a canvas app that displays basic employee details, including Name, Email, Date of Joining (DOJ), Office Location, Department, and Active Status (indicating whether the employee is still with the organization or has left) .
This canvas app uses a SharePoint list data source called ‘Employee Info’.

Remove multiple records using RemoveIf function
Let’s assume you want to remove those records where ID is greate than or equal to 6.

Now, go to the OnSelect property of the button and write the following formula.
RemoveIf( Â 'Employee Info', Â ID >= 6 )
Let’s understand the formula.
- ‘Employee Info’: is the name of data source from which records will be removed.
- ID >= 6: This is the condition used to determine which records should be removed. It specifies that records with an ID value greater than or equal to 6 will be deleted from data source.

Let’s run the app and check if it deletes the records with IDs greater than 6.
Before doing so, note that there are 2 records in the data source with IDs greater than or equal to 6. After clicking the “RemoveIf” button, these two records with IDs 6 and 7 will be removed.

You can see, the records with IDs greater than or equal to 6 have been removed.
Use of RemoveIf function with multiple condition
You can also remove records based on multiple conditions using the RemoveIf function.
Assume you want to remove records where employees are inactive (means IsActive = “No”) and belong to the “HR” or “CS” departments.
Let’s go to the button OnSelect property and modify the previous formula and write below formula.
RemoveIf( Â 'Employee Info', Â (Department = "CS" || Department = "HR") && isActive = "No" )
Let’s run the app and click on RemoveIf button.

You can see, the records with IsActivestatus set to “No” and belonging to the “CS” and “HR” departments have been deleted.
Recommended for you..
- UpdateIf functon in Power Apps
- Text function to format date/time or numbers to text string
- With function in Power Apps
![]()

