cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
wyliet
New Member

Creating distinct set of values from multiple data items

Hi,

 

I'm trying to create a distinct set of values from a column in a spreadsheet.

 

In python I would create a list, iterate through the data and append unique items to a list and I would then have a data source that described all the values that appeared in that column. From this I could build a UI to help users interact with hierarchy in a dynamic way.

 

Is there a similar function in Powerapps? I've looked at 'collections' but can't get it to only hold unique values.

 

Please help,

 

Thanks,

 

Tom

1 ACCEPTED SOLUTION

Accepted Solutions
hpkeong
Community Champion
Community Champion

HI

 

When you said: "...create a distinct set of values from a column in a spreadsheet....", in fact, you exactly right that in PowerApps, you can use:

- Distinct(DataSource, ColumnFieldTitle)

 

In this case, you populate a Collection with ColumnFieldTitle and can use for, such as:

- Gallery

- Dropdown

- ListBox, and anything support Tables.

 

Hope this helps.

 

Have a nice day.

 

hpkeong

View solution in original post

3 REPLIES 3
hpkeong
Community Champion
Community Champion

HI

 

When you said: "...create a distinct set of values from a column in a spreadsheet....", in fact, you exactly right that in PowerApps, you can use:

- Distinct(DataSource, ColumnFieldTitle)

 

In this case, you populate a Collection with ColumnFieldTitle and can use for, such as:

- Gallery

- Dropdown

- ListBox, and anything support Tables.

 

Hope this helps.

 

Have a nice day.

 

hpkeong

View solution in original post

v-micsh-msft
Community Support
Community Support

Hi @wyliet,

 

Just as shared by @hpkeong, Distinct function should do the job for what you would like to achieve in PowerApps.

See the function document here:

Distinct function in PowerApps

There are also filter, search and lookup functions available under PowerApps:

Filter, Search, and LookUp functions in PowerApps

Which you may need to filter the data source based on sepcial column values.

For more function reference, see:

Formula reference for PowerApps

If you need any further assistance, please post back.

Regards

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you so much. This worked a treat!!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,423)