UNIQUE Values From A Collection Column With A Blank At The Top
UNIQUE Values From A Collection Column With A Blank At The Top Input collection: myCities55 City Continent Country New York North America USA London Europe U...
- Published
- Reading time
- 1 min read
Before you start
Is this guide for you?
- Best entry point
- Power Apps
- Time investment
- 1 min read
Imported reference from Matthew Devaney's blog for learning purposes. Original: https://www.matthewdevaney.com/powerapps-collections-cookbook/unique-values-from-a-collection-with-a-blank-at-the-top/. Author: Matthew Devaney.
UNIQUE Values From A Collection Column With A Blank At The Top Input collection: myCities55 City Continent Country New York North America USA London Europe United Kingdom Kyoto Asia Japan Osaka Asia Japan Los Angeles North America USA Paris Europe France Birmingham Europe United Kingdom
Output value: mySolution55 (unique Country names) Result blank USA United Kingdom Japan France Solution code: //Create a collection
ClearCollect(myCities55, { City : "New York" , Country : "USA" , Continent : "North America" }, { City : "London" , Country : "United Kingdom" , Continent : "Europe" }, { City : "Kyoto" , Country : "Japan" , Continent : "Asia" }, { City : "Osaka" , Country : "Japan" , Continent : "Asia" }, { City : "Los Angeles" , Country : "USA" , Continent : "North America" }, { City : "Paris" , Country : "France" , Continent : "Europe" }, { City : "Birmingham" , Country : "United Kingdom" , Continent : "Europe" } ); //Duplicate removal code
ClearCollect(mySolution55, { Result : Blank()}); Collect(mySolution55,Distinct(myCities55,Country)); Code language: JavaScript ( javascript )
Tagged
Collections · Power Apps
Have a Microsoft 365 topic idea?
Share article suggestions, community session ideas, corrections, or real-world scenarios for future nextM365 learning notes.
Keep learning Microsoft 365
Explore more practical guides for SharePoint, Power Platform, Copilot Studio, migration, automation, governance, and security.
Continue learning
Related tutorials
Related questions
Related comparisons
Next action