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 / Returning records with...
Power Apps
Answered

Returning records with a unique set of values on specific columns

(0) ShareShare
ReportReport
Posted on by 31

Hi!

I have a collection looking like the one below.

I want to return the records with a unique set of ClientSplitId and InsuranceTypeId,

which in this case is the combos (3,1) (3,2) (3,3) and (3,4) so I would only get 4 records remaining.

Any help would be thankful!

benyie_0-1656504699912.png

 

Categories:
I have the same question (0)
  • timl Profile Picture
    37,212 Super User 2026 Season 1 on at

    @benyie 

    The GroupBy function will carry out this task.

    GroupBy(YourCollection, 
     "ClientSplitId", 
     "InsuranceTypeId", 
     "RemainingColumns"
    )


    This formula will return a table with 4 rows and 3 columns. The column "RemainingColumns" will contain a nested table that contains the grouped values.

  • benyie Profile Picture
    31 on at

    @timl  Thank you for help!
    I was a bit unclear though, I still want all the 4 original columns but only records containing the set of unique values from ClientSplitId and InsuranceTypeId combined. This would result in 4 rows and 4 columns. Which 4 records I choose from the original table is not of importance.

  • Verified answer
    timl Profile Picture
    37,212 Super User 2026 Season 1 on at

    @benyie 

    If you want the output to include the first row that matches the unique combination, this is the formula you would use:

    AddColumns(
     GroupBy(YourCollection, 
     "ClientSplitId", 
     "InsuranceTypeId", 
     "RemainingColumns"
     ),
     "InsuranceTypeSplitID",
     First(RemainingColumns).InsuranceTypeSplitID,
     "RemovedSplit",
     First(RemainingColumns).RemovedSplit
    )
  • benyie Profile Picture
    31 on at

    @timl Thanks!

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 463

#2
WarrenBelz Profile Picture

WarrenBelz 364 Most Valuable Professional

#3
11manish Profile Picture

11manish 275

Last 30 days Overall leaderboard