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 / Help needed with AddCo...
Power Apps
Answered

Help needed with AddColumns and GroupBy Gallery

(0) ShareShare
ReportReport
Posted on by 380

@WarrenBelz 

Am trying to present a Gallery of data grouped by a field called meterno. I can get the Gallery to display and it is grouped by that field correctly but I need additional fields like eventID added so I am trying to use AddColumns

 

My code for the Items property of the Gallery is not showing any errors but when I try to display the eventID field, for example, it is telling me it is a Record (the Text property for the label in the Gallery is ThisItem.theeventid)

 

the Items property of the Gallery is:

 

AddColumns(
 GroupBy(
 With(
 {
 _preFilter: Filter(
 Claims,
 startdatetime >= (DatePickerFrom_2.SelectedDate) && (enddatetime <= DatePickerTo_2.SelectedDate)
 )
 },
 If(
 !IsBlank(Searchbox_1.Selected.eventID),
 Filter(
 _preFilter,
 (eventID in Searchbox_1.SelectedItems.eventID)
 ),
 _preFilter
 )
 ),
 "meterno",
 "licensee",
 "Title",
 "Data"
),"theeventid",Data.eventID)

 

it's probably something simple but I can't seem to work it out

any help much appreciated as always 🙂

Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,756 Most Valuable Professional on at

    Hi @bobgodin ,

    I have made a few other suggestions as well as fixing the eventID issue<

    With(
     {
     _preFilter: 
     Filter(
     Claims,
     startdatetime >= DatePickerFrom_2.SelectedDate && 
     enddatetime <= DatePickerTo_2.SelectedDate
     )
     },
     AddColumns(
     GroupBy(
     Filter(
     _preFilter,
     Len(Searchbox_1.Selected.eventID) = 0 ||
     eventID in Searchbox_1.SelectedItems.eventID
     )
     ),
     "meterno",
     "licensee",
     "Title",
     "Data"
     ),
     "theeventid",
     First(Data).eventID
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • bobgodin Profile Picture
    380 on at

    @WarrenBelz thanks Warren - much appreciated

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 239

Last 30 days Overall leaderboard