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 / Number the rows of a G...
Power Apps
Answered

Number the rows of a Gallery

(0) ShareShare
ReportReport
Posted on by 14
Sort(
        AddColumns(
            GroupBy(
                'Certifications',Title,Email,UsersGroupedByEmail
            ),
            Points,
            Sum(UsersGroupedByEmail,If('Level'.Value="Max",100,0)
        ),
        Points,SortOrder.Descending
    )

Here's what I have as the "Items" for my Gallery. This works perfectly and they're displayed in rows. However, now I would like it to add a column after the sort that numbers the rows from 1 to N. I've tried various solutions online but none of them seem to work for my situation. Any help is appreciated!

Edit: I don't necessarily WANT an extra column. For example, if there's a way to simply toggle "display row number" or something like that in galleries, then thats fine too
Categories:
I have the same question (0)
  • Verified answer
    Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @Tomasteixeira - you can use the Index function. E.g.:

     

    With(
     {
     _data: Sort(
     AddColumns(
     GroupBy(
     'Certifications',
     Title,
     Email,	 	
     UsersGroupedByEmail
     ),
     Points,
     Sum(
     UsersGroupedByEmail,
     If(
     'Level'.Value = "Max",
     100,
     0
     )
     )
     ),
     Points,
     SortOrder.Descending
     )
     },
     ForAll(
     Sequence(
     CountRows(_data),
     1,
     1
     ),
     Patch(
     {RowNo: Value},
     Index(
     _data,
     Value
     )
     )
     )
    )

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,070

#2
Valantis Profile Picture

Valantis 639

#3
11manish Profile Picture

11manish 608

Last 30 days Overall leaderboard