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

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 Community Champion
Community Champion

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
Community Support

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
New Member

Re: Creating distinct set of values from multiple data items

Thank you so much. This worked a treat!!

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (7,823)