cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gorilla_8
Impactful Individual
Impactful Individual

Distinct a GroupBy on one dropdown

I got a GroupBy on my OnStart:

GroupBy( TableWithTheDataSource; "a";"b";"c";"d";"e";"NameOfTheColumn")

 

So I want to Distinct(NameOfTheColumn;Choices)

 

How I can do that?

 

25 REPLIES 25
BCLS776
Super User
Super User

Put something like this into your dropdown Items:

 

Distinct(myGroupedTable, NameOfTheColumn).Result

 

myGroupedTable can be a collection resulting from your GroupBy, or it can be the return from the GroupBy itself.

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.
Gorilla_8
Impactful Individual
Impactful Individual

@BCLS776 

 

Thanks for the help!

I got this:

Gorilla_8_0-1628181473649.png

 

And this on my "Items":

Gorilla_8_1-1628181500574.png

 

So, why he didn't show:


123.gif






@Gorilla_8 wrote:

@BCLS776 

 

Thanks for the help!

I got this:

Gorilla_8_0-1628181473649.png

 

And this on my "Items":

Gorilla_8_1-1628181500574.png

 

So, why he didn't show:


123.gif






 

That issue is probably to do with grouping by five different columns (a,b,c,d & e in your example). Try grouping by one column to start, so you can see if you are getting the collection you want.

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.
Gorilla_8
Impactful Individual
Impactful Individual

@BCLS776 

 

The same result with one or two columns

When grouping by one column, can you view the collection and verify that the column named NameOfTheColumn contains values that are not nested records? See example:

 

BCLS776_0-1628183301100.png

Distinct on this collection produces this:

BCLS776_1-1628183443598.png

 

 

 

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.
Gorilla_8
Impactful Individual
Impactful Individual

@BCLS776 

 

Yes, I can  see this:

All the column have multiple names, but one column has two differents values

Gorilla_8_1-1628183741486.png

 

 

BCLS776
Super User
Super User

I'm on my phone, so it's tough to see, but that does not look like a collection grouped by a single column. Are you using the right one?

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.
Gorilla_8
Impactful Individual
Impactful Individual

@BCLS776 

 

Yes, I put this on my OnStart:

ClearCollect(ColecaoGSL;GroupBy( TabelaAuxiliar; "COORD_x002e__x0020_ADILIS";"TST_x0020_ADILIS";"AUDITOR_x0020_01";"AUDITOR_x0020_02";"AUDITOR_x0020_03";"NomeDoAvaliadorGSLTST"))
BCLS776
Super User
Super User

Can you please modify your GroupBy so it groups by only one column? The collection will look much different (and work better) if you can do that. 

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

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 (2,029)