Skip to main content
Community site session details

Community site session details

Session Id : 6telHa74IF/K0BH5x615xy
Power Apps - Building Power Apps
Unanswered

Building a Collection / Displaying Data

Like (0) ShareShare
ReportReport
Posted on 15 Jun 2023 18:54:25 by 224 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 19 Jun 2023 at 15:52:27
    Re: Building a Collection / Displaying Data

    @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. 

  • Hack-7 Profile Picture
    224 Moderator on 19 Jun 2023 at 11:59:04
    Re: Building a Collection / Displaying Data

    @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 15 Jun 2023 at 18:57:02
    Re: Building a Collection / Displaying Data

    @Hack-7 

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

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 2

Loading complete