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 Automate / Select DISTINCT with o...
Power Automate
Answered

Select DISTINCT with oData query

(0) ShareShare
ReportReport
Posted on by 402

Is there an easy way to group by a value in a field?  I am pulling records from a SharePoint list based on month.  In these records, there are emails.  I would like to group, or select DISTINCT emails.  Thanks for the help and information.

Categories:
I have the same question (0)
  • Verified answer
    takolota1 Profile Picture
    4,974 Moderator on at

    @iskguy 

     

    If you just need distinct email values, you can get all items, add a Select action after, switch the mapping of Select to a single textbox input & use the Email dynamic content in there. That will get only the email values in an array. Then in a Compose you can use a Union( ) expression on the Select outputs twice like Union(body(‘Select’), body(Select)) to get the unique email addresses.

     

    If instead you need each record associated with each email or some kind of actual GroupBy, then there are a few more involved options:

    Get distinct records: https://powerusers.microsoft.com/t5/Power-Automate-Cookbook/Get-Distinct-Records-amp-Counts/td-p/2191533

     

    GroupBy with xpath: https://youtu.be/z5MxbwURV68?si=EU-oLHsBLQY2GfFr

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 Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard