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 / Group the collection b...
Power Apps
Answered

Group the collection based on 2 columns

(0) ShareShare
ReportReport
Posted on by 2

Hi,

In Custom Page, I have created a collection in below format:

 

Sandeep94_0-1669717817477.png

 

 

I want to group this collection with column "Group" (lookup) and then with column "Grp Type" (choice). If Grp Type column is blank, grouping can be done with Group column alone.

I am supposed to display the table in below format after grouping:

Sandeep94_1-1669717867463.png

 

  

Since I am new to custom page, facing bit difficulty in building the logic in PowerFx.

Looking for help in this!!

 

 

Thanks

Categories:
I have the same question (0)
  • Verified answer
    victorcp Profile Picture
    2,350 Moderator on at

    Hi,

    It is possible to achieve what you want but it is not performatic (if you have a big collection it may brake your app), I would suggest you to group your collection twice, like this:

    GroupBy(
     GroupBy(
     AddColumns(
     ColName, // your collection
     "GroupText",
     Group.Value
     ),
     "GroupText",
     'Grp Type',
     "Group1"
     ),
     "GroupText",
     "Group2"
    )

     But if you really need it, reply this message and I will help you 🙂

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 505

#2
WarrenBelz Profile Picture

WarrenBelz 502 Most Valuable Professional

#3
Haque Profile Picture

Haque 324

Last 30 days Overall leaderboard