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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Returning records with...
Power Apps
Unanswered

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
    36,383 Super User 2025 Season 2 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
    36,383 Super User 2025 Season 2 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard