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 / Gallery with different...
Power Apps
Answered

Gallery with different columns and data based on conditions

(0) ShareShare
ReportReport
Posted on by 20
I have a SharePoint list with a lot of projects with the following data: project code, start year, end year and different budget items (A, B, C...) with an amount for each year.

I want to make a data entry app, so that when you select a specific project on the start screen and go to the next screen, a table gallery appears with the budget items in rows and columns for as many years as the project has, and that in each column the budget for that year appears, from the beginning to the end.

The thing is that for each project the start year and the number of years is different and I don't know how to make those columns dynamic, so that they are generated depending on each project. For example, project 1 can start in 2020 and end in 2024, and project 2 in 2019 and end in 2021… Different number of columns for each project and different years also.
 
I have tried to have a “year” column that records the year, another “value” column that records the amount of the corresponding budget item, etc., but I don’t know how to make the first column of the gallery reflect the values ​​of the start year that corresponds to it based on the project selection. The column value (modern control text imput) has "ThisItem.Value" but I don't know how to filter this value and show only teh first year, and the same with the second column, etc.
 
 
I could modify the way of recording the data in the SharePoint list but I can’t solve the problems I am encountering.
 
If anyone has any ideas that can get me out of this issue, I would appreciate it.
 
Greetings and thanks in advance
Categories:
  • Verified answer
    KeithAtherton Profile Picture
    3,709 Most Valuable Professional on at
    Hey. You could create a collection of years for each project using code similar to this, which creates a collection of 10 years, starting in 2024:
    ClearCollect(colYears, Sequence(10, 2024));
    If you combine this with your project data to create a table of data, where the x-axis are the years, and the y-axis are the projects, then you could create a gallery with text inputs.
     
    Saving data would need to "lookup" the project and year, and save it to an individual record.
     
    It's a dynamic approach but should be possible.

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 352 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 323

#3
Mohsin Ali Profile Picture

Mohsin Ali 226

Last 30 days Overall leaderboard