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 / Calculate relative pos...
Power Apps
Answered

Calculate relative position of list item

(0) ShareShare
ReportReport
Posted on by 19

I have a list with three columns, name, group and seniority number.

 

Seniority number is a company assigned 4 digit number, they will not be sequential within a group.

 

I am trying to calculate someones relative seniority within a given group, or the whole group.

 

Eg: Whole list has 150 items, when the list is ordered by seniority number, you appear as list item 6, you therefore have a seniority of 6/150, or 4%. Or, filter list to Group A, of which there are 50 items, ordered by seniority number, you appear as list item 10, you therefore have a seniority of 20%.

 

This is possible in excel using MATCH, but this function has another use in PowerApps. Any ideas how I can achieve this?

Categories:
I have the same question (0)
  • Verified answer
    TheRobRush Profile Picture
    11,128 Moderator on at

    Just one of likely many many ways but

    TMROSTER is my SPList

    My Gallery Items is

    ForAll(
     Sequence(CountRows(TMROSTER)), {Sequence:Value})

     In my gallery I can then set one of the controls to show sequence number (this will be their place in the list) and then another control to display something liek this

    Last(FirstN(Sort(TMROSTER,Title,Ascending),ThisItem.Sequence)).Title

    Mine in example is sorted by column (their name) in yours you would sort by the seniority value smallest to largest (or whichever direction gives you result you want) This will display each person in order without doing a collect first. and you can reference countrows(splist) and the thisitem.sequence for your maths

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 325 Most Valuable Professional

#2
11manish Profile Picture

11manish 165

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 88 Super User 2026 Season 1

Last 30 days Overall leaderboard