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 / Adding a column of seq...
Power Apps
Unanswered

Adding a column of sequences

(0) ShareShare
ReportReport
Posted on by 85

Hi all,

 

I have a collection "colData" with a single column of values.

 

For each row in colData, I want to add a column called "Year" that starts with 2000.

 

So colData looks like this:

 

Value

123

456

 

I want my final collection to look like this (ultimately it'll increment up to the current year).

 

Year    Value

2000   123

2001   456

 

Thanks in advance!

Categories:
I have the same question (0)
  • ANB Profile Picture
    7,252 Super User 2026 Season 1 on at

    Hi @russrimm1 , You can use the function AddColumns in collection

    AddColumns(colData, "Year" ,Sequence(
     Year(Now()) + 1 - 2000,
     2000,
     1
    ))

     

    ------------------------------------------------------------------------------------------------------------------------------

    I hope this helps.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs up.

    Thanks,
    ANB

  • russrimm1 Profile Picture
    85 on at

    Thanks @ANB, I apologize but when I add this to my collection using:

     

    ClearCollect(coltest2,AddColumns(collData, "Year" ,Sequence(
    Year(Now()) + 1 - 2000,
    2000,
    1
    )))

     

    I end up with each of my Values in the first column, but a table containing all of the years in the 2nd column.

    russrimm1_0-1696442659919.png

     

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 396 Most Valuable Professional

#2
11manish Profile Picture

11manish 134 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 101 Super User 2026 Season 2

Last 30 days Overall leaderboard