web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 740 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 342 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard