
Announcements
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?
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