cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bonifacious
Frequent Visitor

Distinct formula doesn't work on collection

Hello!

 

The data source is a table in Oracle Database with columns xxx, yyy, name. The number of rows around 4000 and has 9 distinct NAME values. All of the columns have VARCHAR2 format.
I use the solution there you create a bunch of collections and create one mega-collection out of it.

How I do it:

On Visible I set -

Concurrent(
ClearCollect(Digital, Filter('[S].[D_ORG]', NAME = "Digital Services")),
ClearCollect(Group, Filter('[S].[D_ORG]', NAME = "Group Management")),
ClearCollect(CX, Filter('[S].[D_ORG]',NAME = "Customer Experience"))
)
;
ClearCollect(AllStructure, Digital, Group, CX)

Seems like I get the data I needed, but if I use distinct on my mega-collection I get an error "Expected 2, recieved 1". I checked the data again and I have several values in the column I use.

Any ideas?

1 ACCEPTED SOLUTION

Accepted Solutions

@bonifacious 

Its a syntax error.  The table name and column name must be separated by a comma, not a dot.

Distinct([@Allstructure], NAME) 

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

4 REPLIES 4
mdevaney
Super User
Super User

@bonifacious 

Where is your DISTINCT formula?  That is what caused the problem but I cannot see it in the code you supplied.

 

Distinct needs 2 arguments

Distinct(your_table_name, your_column_name)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up." 

Hey, @mdevaney !

 

Basically after I create mega-colelction AllStructure I want to use the formula Distinct([@Allstructure].NAME) for a dropbox

 

@bonifacious 

Its a syntax error.  The table name and column name must be separated by a comma, not a dot.

Distinct([@Allstructure], NAME) 

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Oh my, I am missing the simple stuff.

Thank you so much, @mdevaney !

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (6,193)