Showing results for 
Search instead for 
Did you mean: 
Helper V
Helper V

Sort Month Drop Down Chronologically

Hi all!


I have a drop down in my power apps and the items are the months column from SharePoint. How do I sort the month record chronologically?


For example:






Right now, what I did is:

Sort(Distinct(Filter('SP LIST', Dept = varDept, Year = RecordedYear.Selected.Result), Month),Result,Descending)


But it sort the month alphabetically like this:





Any idea for this?


@WarrenBelz well said. Only reason I introduced a collection was to throw out an additional alternative. At the end of the day, it all depends on how the data and app are designed. And as always, there's always more than 1 ways to do something!

Hardit Bhatia

Thank you everyone!


I have tried @PowerAddict suggestions but I got the attached warning. I am not sure whether I write it wrongly or what. I filter the sharepoint list and then after that I filter the collections. 


For now, the solution I wanted is from @Anonymous . I understand that date column will be very helpful but in my case, I do not require exact date so that is why I did not put date column. 


Thank you for your help. Have a nice day ahead!

@_kikilalaaa @Anonymous @WarrenBelz @eka24

The only thing I would like to flag is that AddColumns is only partially delegable. What I mean by that is that parameters of AddColumns is delegable (or can be based on your data source and formula). However, irrespective of whether the parameters of AddColumns is delegable or not, AddColumns output is not. Which means it will always be subject to the non-delegation limit.

AddColumns used to be my favorite solution approach until I found this out the hard way. Reason why it was hard? Because this is one delegation issue for which the App Checker doesn't throw a delegation warning. That's why I call it the "Invisible Delegation Issue"!

Here is a link to my blog post about this:

Just wanted to throw it out there so you can factor that in if it affects you.

Hardit Bhatia

Hi @PowerAddict ,


Yeah I encounter that warning before but I am still not sure what it is. Your post really help me to understand! However, I have 2 questions,


1. To confirm, does this means that if you set the limit to 10, they will only search up until 10 data for that particular column is it? 

For example, I have a record of year 2020 and the recorded months are Jan-Dec. However, Since the limit is 10, I can only see up until Oct, is it?


2. Is the limit set is applicable for each column or the sum of all records that I have? I have record of year from 2000-2020. When I set the limit to 10, am I able to find the record for 2020 and retrieve the months? 


To begin with, the default limit is 500. And it can be increased to 2000.

Now to answer your questions, if the count of results of the expression within your AddColumns function is more than 500 (if the limit is 500), you will get incorrect or incomplete results.

That should answer both your questions. Let me know if I wasnt clear in my response.

Hardit Bhatia

Okay, now I understand. So since I only want to search for months (which the max it would be 12), I think it is okay for me to use this method. But I will reconsider this for other things that might have a lot of records.  Thanks!!

Not applicable


Nice article mate, thanks for the share. I rarely, if ever, use Search() but gave it a try on my test SP List and straight up got a delegation warning on a simple text field. Search mustn't work for SP?


I will keep the AddColumns tip in mind though. Thanks!



In and Search are not delegable with SharePoint. An alternate to Search is StartsWith when it comes to SharePoint.

AddColumns has troubled me a lot. So hopefully it wont trouble anyone else!

Hardit Bhatia

Helpful resources

Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,979)