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 / Building a Collection ...
Power Apps
Unanswered

Building a Collection / Displaying Data

(0) ShareShare
ReportReport
Posted on by 226 Moderator

This issue has me stumped. I am working with data that I do not control, so I have to try and model something that fits the needs based on that.

We have an SP list called projects which holds all of the current building projects that are being worked on. There is a 2nd list called projectBudget, that holds budget line items for each project.

My problem is this. Let's say I have 3 line items that are as follows:
projectID - Description - amount - year
proj001 - Labor - 6000 - 2023
proj001 - Labor - 12000 - 2024
proj001 - Labor - 3000 - 2025

What I need to do is display them in a gallery on a single line as follows:
Description - Year 1 - Costs - Year 2 - Costs - Year 3 - Costs
Labor - 2023 - 6000 - 2024 - 12000 - 2025 - 3000

How can I build a collection to accomplish this?

Categories:
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Hack-7 

    You don't need a collection for that.  You can use the AddColumns() function to look up the values.

  • Hack-7 Profile Picture
    226 Moderator on at

    @Drrickryp how exactly would I use AddColumn() without building a new collection?  Or maybe I am putting that the wrong way!

     

    I am (currently) not using a collection for this requirement.  Does using AddColumn() add a temporary column t a table?  Or would I need to have a collection first?  

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Hack-7 

    AddColumns() reshapes a table without actually making any permanent changes to it. There is not a need for a collection unless you want to use it in other places in  your app.  AddColumns() is one of 4 table shaping functions.  See https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-table-shaping for a description of all of them with examples. 

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

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard