Skip to main content

Notifications

Community site session details

Community site session details

Session Id : +7Q0WFM5DU0f7aSg1BcZ/a
Power Apps - Building Power Apps
Answered

Sort Column value from biggest to lowest

Like (0) ShareShare
ReportReport
Posted on 3 Sep 2020 11:51:16 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

  • Verified answer
    timl Profile Picture
    34,978 Super User 2025 Season 1 on 08 Oct 2020 at 18:18:21
    Re: Sort Column value from biggest to lowest

    Hi Peter,

    I'm glad that works. You can use AddColumns to add 'Ha Mangler' like so.

     

    SortByColumns(AddColumns(Jordpr0ver5, "valHaBestilt", Value(HaBestilt), "valHaMangler", Value(HaMangler)),
     SortPriority,
     If(SortDescending,Ascending,Descending)
    )

     

    You can then sort that column with this formula.

    UpdateContext({SortPriority:"valHaMangler",
     SortDescending:!SortDescending}
    )

     

  • Community Power Platform Member Profile Picture
    on 06 Oct 2020 at 06:47:53
    Re: Sort Column value from biggest to lowest

    Hi @timl,
    It worked what you wrote! 🙂

    I have 2 where addcolumns must be used.
    How do I put them together inside the items property of your gallery. 
    Look at the pictures.

    The image with "ha missing" worked but just could not get the other sort buttons to work when I tried earlier. I just want to know how to put several together in items property

    I hoppe you understand. 🙂 




  • timl Profile Picture
    34,978 Super User 2025 Season 1 on 05 Oct 2020 at 22:59:37
    Re: Sort Column value from biggest to lowest

    Hi Peter

    If your gallery isn't sorting in numeric sequence because HaBestilt is of data type "single line text", you can create a column that contains the numeric representation of HaBestilt - let's call this valHaBestilt.
    You would set the items property of your gallery to this:

    SortByColumns(AddColumns(Jordpr0ver5, "valHaBestilt", Value(HaBestilt)),
     SortPriority,
     If(SortDescending,Ascending,Descending)
    )

     

    For your sort label, you would then set the SortPriority variable to sort by valHaBestilt like so:

    UpdateContext({SortPriority:"valHaBestilt",
     SortDescending:!SortDescending}
    )

     

  • Community Power Platform Member Profile Picture
    on 05 Oct 2020 at 08:22:00
    Re: Sort Column value from biggest to lowest

    Hi @WarrenBelz and @timl,

    I have tried to follow her from this link https://www.youtube.com/watch?v=vyBsk7-1Mxk&t=1836s
    Title works but "Ha Bestilt" does not work? In sharepoint, it stands to be single line. What should I do so that it can also sort?

    See the picture
    - PHH

     

  • Community Power Platform Member Profile Picture
    on 22 Sep 2020 at 08:47:33
    Re: Sort Column value from biggest to lowest

    Hi @WarrenBelz and @timl again,

    I'm sorry I do not quite understand what you write and have sent.
    Is it possible?

    If possible you will then be able to make a guide step by step in how to do it. If this is not possible you will then make a guide in how to do the sorting function on all the others but not "have shortcomings"
     


    Plz, would like help 🙂

    -PHH

  • Community Power Platform Member Profile Picture
    on 18 Sep 2020 at 13:02:35
    Re: Sort Column value from biggest to lowest

    Hi @WarrenBelz@timl 
     As you can see, the field really works at the last "ha missing" But not by the others. I can not really understand what you are writing. Is it possible to make everyone work depending on which column it is? Hope you understand.

     
     

     

     

  • WarrenBelz Profile Picture
    146,743 Most Valuable Professional on 17 Sep 2020 at 11:54:01
    Re: Sort Column value from biggest to lowest

    Hi @Anonymous ,

    I was simply agreeing with @timl 's AddColumns suggestion as you tagged me.

    The documents on this are here.

  • Community Power Platform Member Profile Picture
    on 17 Sep 2020 at 10:52:20
    Re: Sort Column value from biggest to lowest

    Hi @WarrenBelz,

    I just do not know how to make my field "ha missing" in sharepoint and how I minus the 2 values ​​from each other Do you have any explanation for that.

    It is also important to me that it can update up in sharepoint.

    Preferably step by step



    -PHH

  • WarrenBelz Profile Picture
    146,743 Most Valuable Professional on 17 Sep 2020 at 10:42:32
    Re: Sort Column value from biggest to lowest

    Hi @Anonymous ,

    I do not use calculated columns in SharePoint for a number of reasons including the difficulties you are having.

    You may be better off using AddColumns to your data set using the same calculation.

  • Community Power Platform Member Profile Picture
    on 16 Sep 2020 at 12:48:42
    Re: Sort Column value from biggest to lowest

    Hi @WarrenBelz 

    I have read the article but unfortunately can not make it work since I use some different values. for example. calculating values ​​and text fields and choices field. Do you have a solution for that? Well please have a guide step by step if possible 🙂

     
    Sort1234.jpg
    -Peter

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,743 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,079 Most Valuable Professional

Leaderboard