While working with the Power Apps Dropdown control, we usually need to filter the data like SharePoint list records, Collection records, and Excel items based on the dropdown selected value.
But, sometimes, we need to add an “All” option to a dropdown in Power Apps that allows users to display all the records on the other controls, i.e., [Gallery or Data table].
You can follow this Power Apps tutorial to learn how to add All option in Power Apps dropdown control with a simple example.
How to Add All Option in Power Apps Dropdown
We can add the “All” option to the Power Apps dropdown to enhance the user experience by providing a convenient option to select all items in the dropdown at once rather than selecting each item individually.
Let’s take a simple scenario: I have a SharePoint Online list, i.e., [Project Tracker]. This list contains different columns with various data types.
| Column Name | Data Type |
| Title | It is a default single line of text |
| Description | Multiple lines of text |
| Status | Choice |
| Start Date | Date and time |
| End Date | Date and time |
| Assigned To | Person or Group |

In Power Apps, there is a Dropdown control and a Data table control.
The dropdown control retrieves all the SharePoint choice field records [Status], and the data table filters and displays each record from the SharePoint list based on the dropdown selected value.

However, I was required to add an “All” value to the dropdown, and whenever the user selects the All option in the dropdown, the data table will display all SharePoint list records.
Have a look at the below screenshot for the output.

To work around this, follow the below steps. Such as:
1. Connect a Blank canvas app to the respective SharePoint Online list [Project Tracker]. On the Power Apps Screen. Insert a Dropdown control and set its Items property as:
Items = Distinct(
'Project Tracker',
Status.Value
)
Where,
- ‘Project Tracker’ = SharePoint Online list
- Status = SharePoint list choice field

2. Then, insert a Data table control and set its Items property to the code below:
Iems = Filter(
'Project Tracker',
Status.Value = drp_Status.Selected.Value
)
Where,
- drp_Status = Power Apps dropdown name

3. Whenever the user selects any value from the dropdown, the data table will filter and display the records based on the dropdown selection like below.

4. Now, I would like to add the “All” option to the dropdown to display all the records. For that, select the specific screen and set its OnVisible property as:
OnVisible = ClearCollect(
colProjects,
{Value: "All"}
);
Collect(
colProjects,
Distinct(
'Project Tracker',
Status.Value
)
)
Where,
- colEmployee = Power Apps collection name
- {Value: “All”} = Collection Item

5. Next, select the Dropdown control and set its Items property as:
Items = colProjects
