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?
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.
@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?
You don't need a collection for that. You can use the AddColumns() function to look up the values.
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
mmbr1606
275
Super User 2025 Season 2