cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
wyliet
Level: Powered On

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
Level 10

Re: Creating distinct set of values from multiple data items

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
Level 10

Re: Creating distinct set of values from multiple data items

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

Community Support Team
Community Support Team

Re: Creating distinct set of values from multiple data items

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.
wyliet
Level: Powered On

Re: Creating distinct set of values from multiple data items

Thank you so much. This worked a treat!!

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,044)