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 / Sort Column value from...
Power Apps
Answered

Sort Column value from biggest to lowest

(0) ShareShare
ReportReport
Posted on by

Hi all,

I have tried to search for something that could give a lot of the answer to how many filter function that can rank the values ​​from largest to smallest and vice versa.

That's the value of "ha missing" I would like to have ranked

If it can be explained step by step it will be very nice!!!

I hope you can help me, please!

See the picture
-Peter

Categories:
I have the same question (0)
  • timl Profile Picture
    36,393 Super User 2025 Season 2 on at

    Hi  Peter,

    The SortByColumns can help you.

    https://docs.microsoft.com/en-gb/powerapps/maker/canvas-apps/functions/function-sort 

    In this case, you would amend the Items property of your gallery using the formula beneath.

    SortByColumns( <InsertExistingItemsFormulaForGallery1>, 
     "ha missing", Descending 
    )

     

  • TJO Profile Picture
    230 on at

    @Anonymous You can set you gallery items property to sort depending on a boolean variable:

     

     

    SortByColumns(
     tabDaten,
     "Ha Missing",
     If(
     varSortAscending,
     Ascending,
     Descending
     )
    )

     

     

     Then on the sort button OnSelect property you toggle the boolean variable:

     

     

    Set(varSortAscending, !varSortAscending)

     

     

    So without setting pressing the sort button the sorting should be descending upon loading at first since varSortAscending will be blank/false.

     

  • Community Power Platform Member Profile Picture
    on at

    Hi @TJO,

    It just turns the column around. the black not on the values.

    See the pictures

  • TJO Profile Picture
    230 on at

    @Anonymous That is weird. Maybe there is a problem with the space in your column name (if your data is in SharePoint or Excel). Could you try with "ha_x0020_missing"

  • Community Power Platform Member Profile Picture
    on at

    Hi @TJO 
    No?

  • TJO Profile Picture
    230 on at

    @Anonymous mmh, could you paste your whole formula in here please

  • Community Power Platform Member Profile Picture
    on at

    Hi @TJO,

    The first formula is for the gallery and the second formula is for the icon.

    SortByColumns(
                 Jordprøver5,
                 "Ha_x0020_mangler",

                    If( varSortAscending,
                    Ascending,
                    Descending
             )
    )



    Set(varSortAscending, !varSortAscending)


    -Peter

  • TJO Profile Picture
    230 on at

    @Anonymous The formulas seem correct.
    Could this be a number stored as text issue?  

  • Community Power Platform Member Profile Picture
    on at

    Hi @TJO,

     The field is a calculated field and is, and it is set to number.

    -phh

     

  • Community Power Platform Member Profile Picture
    on at

    Hi @TJO,

    Have you had a look at it or is it not possible?

    -PHH

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard