Are you ready to work with Power Apps Collection Distinct Filter? This Power Apps tutorial will show us how to work with the Power Apps Collection Distinct Filter, including various scenarios.
Also, we will explore some more examples related to distinct filters in the Power Apps Collection like:
- Power Apps Collection Distinct Filter With Choice Value
- Power Apps Collection Distinct Filter With Number
- Power Apps Collection Distinct Filter With Date
Check out Power Apps Gallery Control Examples Download [20 Various Real Scenarios]
Power Apps Collection Distinct Filter
Let’s discuss how to use distinct filters in the Power Apps Collection.
- The screenshot below represents two Power Apps Gallery Controls and two Button controls (Create Collection From SP List & Create Unique Collection).
- When a user clicks the first button (Create Collection From SP List), the collection will be created from a SharePoint list and displayed in the first gallery control.
- Similarly, when a user clicks the second button (Create Unique Collection), the distinct or unique records will be generated from the first collection and displayed in the second gallery control, as shown below.

Setup a SharePoint List
The below represents a SharePoint List of Products having these many columns:
| Columns | Datatypes |
|---|---|
| ID | Number |
| Title | Single line of text |
| Vendor | Choice |
| Status | Choice |
| Quantity | Number |
| Sales Date | Date and time |
Also, this SharePoint list has these many below records.

Now, let’s create a collection from this SharePoint list and filter the distinct values from the collection.
- Insert a Power Apps Button Control and set its OnSelect property to the code below: [Not only button’s OnSelect but also, you can write the code below on Screen’s OnVisible or App’s OnStart property as per your need]
OnSelect = ClearCollect(
colProductDetails,
Products
)
Where,
- colProductDetails = Collection Name
- Products = SharePoint List Name

- Then, add a gallery and set its Items property as:
Items = colProductDetails

- Now, to get all the distinct values from the Power Apps Collection, add another button and write the below formula on its OnSelect property:
OnSelect = ClearCollect(
colUniqueProducts,
Distinct(
colProductDetails,
Title
)
)
Where,
- colUniqueProducts = Provide a new collection name
- colProductDetails = Specify the created collection name
- Title = Provide the column name from the collection [that you want to display unique values]

- Add another Gallery control and set its Items property as:
Items = colUniqueProducts
Refer to the image below.

- To display the unique collection results in the gallery, set the Label’s Text property as:
Text = ThisItem.Value
