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 Apps / Data aggregation in a ...
Power Apps
Unanswered

Data aggregation in a Galery

(0) ShareShare
ReportReport
Posted on by 52

Hi,

 

I need to aggregate data in a powerApps Gallery.

For example I have a level with countries = main Gallery, and for each country I have one or more cities = subGallery.

 

Number of cities for a country is not always the same :

 

aggregation.JPG

 

For each row in the SubGallery I want to click and show details for the selected city

 

Have any ideas ?

 

Thanks

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,717 Most Valuable Professional on at

    Data isn't actually stored in a gallery.  The Gallery just shows the filtered data that is stored in a data source or collection behind the scenes. So for your requirements I would use two galleries and a data form or table.  Assuming you have two data sources, where the first is a list of countries and cities and the second is a list of Cities with their information.  Then you would add one gallery to the page and show the list of the cities sorted by country.  In the second gallery you would show a list of cities for the country selected in gallery #1. (Note, you could do this with just one gallery showing countries with each city).  Then in the final form or data table you would show the city that is selected in Gallery #2.

     

    To do this just set the data source property of the Gallery or form to the appropriate data source and then set the items or item based on the selected item in the gallery above using a Filter or Lookup.

  • eka24 Profile Picture
    20,923 on at

    With 2 Galleries:

    1. MainGallery items to MainDatasource: Counteries
    2. SubGallery items to Filter(SubDatasouce,CountryName=MainGallery.Selected. CountryName)
    3. Note: MainDatasource has Only Counteries and SubDatasource has both countries and cities

     

     

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard