Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

accessing grouped data

(0) ShareShare
ReportReport
Posted on by 22

Hi

 

I trying to group info in a collection and access and display it on a gallery like below.

 

This is my collection Planning

This is the datasouce PlanningThis is the datasouce Planning

After grouping information by using ClearCollect(byName,GroupBy(Planning,"Name","Rest")), I got the followinggroupby.PNG

 

Rest column I got the following:

Rest.PNG

 

My question is:

How can I display information in a gallery as below?

gallery.PNG

 

Many thanks

 

  • Muganga Profile Picture
    22 on at
    Re: accessing grouped data

    Excellent RandyHaves

     

    For Certs...did work perfectly however still struggling with the earliest date.

     

    I tried With({_val:Concat(First(Sort(ThisItem.rest, EXPIRE_DATE), EXPIRE_DATE & ", ")).EXPIRE_DATE}, Left(_val, Len(_val)-2))

     but did not work!

     

    I tried using only as you suggested 

    Label3.Text :  First(Sort(ThisItem.rest)).EXPIRE_DATE

    but did no worked.

     

    Pretty sure it is something I am doing wrong with FIRST function.

     

    thanks again for your help

     

  • Verified answer
    RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on at
    Re: accessing grouped data

    @Muganga 

    No problem!

    Change your labels in the Gallery row and set as follows:

    Label1.Text :  ThisItem.Name

    Label2.Text :  With({_val:Concat(Sort(ThisItem._recs, Cert), Cert & ", ") }, Left(_val, Len(_val)-2))

    Label3.Text :  First(Sort(ThisItem._recs)).Expire

     

    This will give you the Certs sorted ascending and the earliest date displayed.

  • Muganga Profile Picture
    22 on at
    Re: accessing grouped data

    Thank you for your prompt answer. It worked perfectly.

     

    - How could I have column 2,3 and 4 sorted ascending and get the earliest date displayed?

     

    Before

    aaa         2          1          3           4/12/21, 9/09/21, 22/06/21
    bbb        3          2                      7/10/21, 2/01/21
    ccc         2          1                       6/07/22, 13/12/21

     

    After

    aaa         1          2          3           22/06/21
    bbb        2          3                       2/01/21
    ccc         1          2                       13/12/21

     

    I was wondering not being possible get the earliest date after using concat as this function work with string format variable. Am I right?

  • RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on at
    Re: accessing grouped data

    @Muganga 

    Set your Items property of your Gallery to:

    GroupBy(Planning, "Name", "_recs")

     

    Place a labels in the Gallery row and set as follows:

    Label1.Text :  ThisItem.Name

    Label2.Text :  With({_val:Concat(ThisItem._recs, Cert & ", ") }, Left(_val, Len(_val)-2))

    Label3.Text :  With({_val:Concat(Sort(ThisItem._recs, Expire), Expire & ", ") }, Left(_val, Len(_val)-2))

     

    I hope this is helpful for 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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1