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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Sorting Gallery by a s...
Power Apps
Unanswered

Sorting Gallery by a sharepoint list column set up with choices

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

(Disclaimer : English is not my first language)

 

Hi guys, I'm new on Power apps and this is my problem:

 

I have a sharepoint list called : List1

I have column within List1 called : Column1

Its values are from a multi choice Dropdown menu : "Choice 1" , "Choice 2", "Choice 3"

What I'm trying to do : Displaying a gallery based on List1 that is sorted in this order : Choice 1 then Choice 2 then Choice 3.

 

I always get an error telling me that I can't sort Column1 because "this type can't be sorted".

 

Sort(
Filter(
List1;
Column2=_User
);
Column1;
SortOrder.Descending
)

 

I'm filtering to display only the tickets regarding this _User.

 

Any help would be much appreciated.

 

Thanks

 

Categories:
I have the same question (0)
  • NickMerrick Profile Picture
    419 Super User 2024 Season 1 on at

    you have to sort by the columns extracted text value, since your attempting to sort a record data type, which cannot be sorted. So you first need to convert Column1 to text. You might be able to do that by useing Text(Column1) and if not try Text(Column1.Selected.Value)

  • WarrenBelz Profile Picture
    156,456 Most Valuable Professional on at

    Hi @Anonymous ,

    You cannot sort by a Table column - the best you will do here is the first selected item

    Sort(
     AddColumns(
     Filter(
     List1;
     Column2=_User
     );
     "SortCol";
     First(Column1).Value
     ); 
     SortCol; 
     SortOrder.Descending
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @NickMerrick wrote:

    you have to sort by the columns extracted text value, since your attempting to sort a record data type, which cannot be sorted. So you first need to convert Column1 to text. You might be able to do that by useing Text(Column1) and if not try Text(Column1.Selected.Value)


     

    Well thanks for your help. 

    This solution seems to almost work but let me add another problem here : I need to sort but not alphabetically.

    Any thoughts on how to proceed ? 😓

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @WarrenBelz wrote:

    Hi @Anonymous ,

    You cannot sort by a Table column - the best you will do here is the first selected item

     

    Sort(
     AddColumns(
     Filter(
     List1;
     Column2=_User
     );
     "SortCol";
     First(Column1).Value
     ); 
     SortCol; 
     SortOrder.Descending
    )

     

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps


     

    Thank you for your answer.

    I'm getting an error on First(Column1).Value -> not valid argument type (Record). Tablue value expected.

  • WarrenBelz Profile Picture
    156,456 Most Valuable Professional on at

    @Anonymous ,

    I can only respond to what you posted

    WarrenBelz_0-1678792378042.png

    and the code I posted is valid for that field type (multi-choice column)

    Sort(
     AddColumns(
     Filter(
     List1;
     Column2=_User
     );
     "SortCol";
     First(Column1).Value
     ); 
     SortCol; 
     SortOrder.Descending
    )

    If Text(Column1) is working, then the field cannot be multi-choice - it must be something else.

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    image.png

    Pardon my english, maybe this kind of Type is not what is called multichoice in english.

    I tried to translate to generic informations because everything is in French 😅

     

    The order I want to sort my gallery is Non lu > A traiter > En cours TM > En cours INTSS > Observation > Traité > clôturé.

    Because Non lu = Unread and I want these labelled ticket to appear at the top of my gallery 

  • WarrenBelz Profile Picture
    156,456 Most Valuable Professional on at

    @Anonymous

    Still strange that Text works, even if it is Single Choice - normally that would be

    Sort(
     AddColumns(
     Filter(
     List1;
     Column2=_User
     );
     "SortCol";
     Column1.Value
     ); 
     SortCol; 
     SortOrder.Descending
    )

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard