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 / GroupBY on large datas...
Power Automate
Unanswered

GroupBY on large dataset WITHOUT USING apply to each

(0) ShareShare
ReportReport
Posted on by 18

I have a large dataset of 8000+ records that needs to be grouped by the id and then create the output as an xlsx file. I know how to do the latter half through office scripts, but doing the first part of this (grouping by the id) through an apply to each is off the table because of the large dataset.

 

A sample is as such:

firstname: Bob, lastname: Smith, id: 123, state: IL,

firstname: Bob, lastname: Smith, id: 123, state: MO,
firstname: Bob, lastname: Smith, id: 123, state: PA,

firstname: Bob, lastname: Smith, id: 123, states: TX,

firstname: Jane, lastname: Doe, id: 234, states: CO,

firstname: Jane, lastname: Doe, id: 234, states: NY,

firstname: Jane, lastname: Doe, id: 234, states: IL,

firstname: Jane, lastname: Doe, id: 234, states: PA

 

I need to create a flow where it can group by the id and return an array where each record is unique where it looks like this:

firstname: Bob, lastname: Smith, id: 123, states: IL, MO, PA, TX

firstname: Jane, lastname: Doe, id: 234, states: CO, NY, IL, PA

 

My first thought was to do this partially in Power Automate and partially in PowerApps by grabbing the records inPower Automate, do a select statement, and then send a response to PowerApps to use the GroupBy function. In PowerApps, capture the results of the response in a collection, and group the collection by the id, and then do a Concat of the states in the gallery. Then send this grouped collection back to a second flow that creates the csv table and the xlsx file using office scripts.

 

Seems like a lot of back and forth. My question: Is there a way to GroupBy in Power Automate without doing an apply to each? If so, please provide an example of steps or point me to a video. I've searched and all of the videos are using apply to each.

 

Thanks so much!

 

 

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    on at

    Hi @Ks4 ,

     

    No, there is no such a Function like PowerApps'"GroupBy"  in Power Automate. If you want to do "GroupBy" in a flow, I'm afraid the only way is to using 'Apply to each'. But you can create a new idea through the below URL, then ask  your colleagues to raise up the votes.  

     

    Power Automate Ideas - Power Platform Community (microsoft.com)

     

    The  product team has direct visibility of these ideas and they will implement it on the basis of the highest number of votes received. 

     

    Best Regards, 

    Bof

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 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard