web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Use Collect and Distin...
Power Apps
Answered

Use Collect and Distinct in one function

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi

I want to get a collection which is containing the input from an sql tabel, but as well distinct values of one single column from the same table. 
ClearCollect(StructureCollection;ShowColumns(Distinct('[dbo].[Structure]';"Entity_Key");"Entity_Key"));;
Collect(StructureCollection;'[dbo].[Structure]')

So the output should be the table and distinct values of one column, where all the other columns are empty. 

Can anyone come up with an idea of solving this problem? 


Categories:
  • Verified answer
    PavanKumar Profile Picture
    479 on at

    Hi,

     

    yes you can do that as below

     

    ClearCollect(colStructure,'[dbo].[Structure]');
    ClearCollect(
    colStructureFinal,
     AddColumns(
    colStructure,
     "DistinctColumn",
     Concat(Distinct(colCaseList,'Entity_Key'),Result&" ,")
     )
    );

    If this answers your question mark it as verified and give a thumbs up

    Regards,

    Pavan Kumar Garlapati

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 409 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard