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 / Values over 100 not sh...
Power Apps
Answered

Values over 100 not showing in top 10 list

(1) ShareShare
ReportReport
Posted on by 33
Hello
 
I have built an app for students to complete tasks at school, a top 10 leaderboard was asked for and so I implemented one, however it is having issues.
 
The leaderboard works by looking at an SP List (which has about 400 rows by 200 columns), and then displays the top 10 people with the highest completed tasks. There are also filtering options to split the leaderboard up into year groups. 
 
However when a student has completed more than 100 tasks the leaderboard stops showing them or occasionally moves them to a random point within the top 10 list.
 
This is the code on the gallery to show the top 10 along with the filtering:
 
 
FirstN(Filter(Sort('SP LIST','Total Tasks Completed',SortOrder.Descending),StartsWith('EmailAddress',Top10FilterTag)),10)
 
Underlined filters based on year group if an option is selected.
 
 
 
Below is an example of students with over 100 completed tasks but not being at the top:
 
 
 
Is there something I am missing to show the top 10 in the correct order?
 
 
 
Thank you for any assistance.
Categories:
I have the same question (0)
  • Suggested answer
    Daniel Bocklandt Profile Picture
    5,099 Super User 2025 Season 2 on at
    Hey could you try this: 
    FirstN(Sort(Filter('SP LIST','Total Tasks Completed',StartsWith('EmailAddress',Top10FilterTag)),SortOrder.Descending),10)
    Seems like there is a mix with the filtering so i've put the sorting after the filter. The Top10FilterTag is that a variable? 
     
    If this helped you please consider accpeting it as solution so that others can find the solution as well. 
     
  • PA-15051058-0 Profile Picture
    33 on at
    Thanks for this DBO DV, however it did not work, I got a completely random order:
     
    Yes Top10FilterTag is a variable to filter based on year group.
     
    Thank you for the suggestion!
     
     
  • Suggested answer
    Daniel Bocklandt Profile Picture
    5,099 Super User 2025 Season 2 on at
    Hey Okay could you then try this instead: 
    FirstN(
        Sort(
            Filter(
                'SP List',
                StartsWith('EmailAddress',Top10FilterTag)
            ),
            'Total Tasks Completed',
            SortOrder.Descending
        ),
        10
    )    
    This will do the trick. 
     
    If this helped you please consider accpeting it as solution so that others can find the solution as well. 
     
  • WarrenBelz Profile Picture
    153,075 Most Valuable Professional on at
    A suggestion if the issue is FirstN having Delegation issues - I have to assume that the filter on the Variable is working properly.
    With(
       {
          _Data:
          Filter(
             Sort(
                'SP LIST',
                'Total Tasks Completed',
                SortOrder.Descending
             ),
             StartsWith(
                'EmailAddress',
                Top10FilterTag
             )
          )
       },
       FirstN(
          _Data,
          10
       )
    )
     
  • PA-15051058-0 Profile Picture
    33 on at
    Thank you both DBO_DV and WarrenBelz,
     
    Unfortunately both pieces of code still result in the original post issue.
    Thank you again for your assistance, I am starting to wonder if this is a PowerApps issue/limitation.
     
  • Daniel Bocklandt Profile Picture
    5,099 Super User 2025 Season 2 on at
    If you remove the FirstN section of the Formula does it work then? 
    try spillting the formula to find where the error is. 
     
    //First Attempt:
        Sort(
            Filter(
                'SP List',
                StartsWith('EmailAddress',Top10FilterTag)
            ),
            'Total Tasks Completed',
            SortOrder.Descending
        )
    
    //If this doesn't work try this: 
    Filter(
            'SP List',
            StartsWith('EmailAddress',Top10FilterTag)
    )
    
    //If this works try this:
    Sort(
         'SP List',
         'Total Tasks Completed',
         SortOrder.Descending
    )
     
    Please let me know where the issue commes from. 
     
  • Suggested answer
    Pstork1 Profile Picture
    68,717 Most Valuable Professional on at
    I'm assuming that 'Total Tasks Completed' is a Single line of Text column. If it is then the problem is that sorting the column is being done alphabetically, not numerically.  The easiest fix would be to change the column to an Integer instead of Text. Then the Sort will work the way you want it to and you'll get the top ten values.  
  • Verified answer
    PA-15051058-0 Profile Picture
    33 on at
    Thank you to everyone for the help, Pstork1 gave me the idea to find the solution.
     
    The Value in the list is numerical however power apps is seeing it as text, so I added Value('Total Tasks Completed'), which is now working for the leaderboard.
     
    Code now looks like this for anyone else having similar issues:
     
    FirstN(Filter(Sort('SP LIST',Value('Total Tasks Completed'),SortOrder.Descending),StartsWith('EmailAddress',Top10FilterTag)),10)

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard