Showing results for 
Search instead for 
Did you mean: 
Not applicable

Powerapps sort by date columt from sharepoint list

I have a SharePoint list called Projects.

In this list I have a Date column called NextFollowup.

What I did in SharePoint was use the power of "group by" to make a view and make it easy to see what projects are upcoming.


How can I do this in Powerapps? I want to sort by date so that i get:

next week first then

14 days from today and so on.

Super User
Super User

Do you want to sort the values in a gallery?  Just use some code like this:



Sort(your_datasource_name, DateColumnName, Ascending)


Or if you only want today and future days to show:

Sort(Filter(your_datasource_name, DateColumnName >= Today()), DateColumnName, Ascending)


If it is not what you wanted show an example.


Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Super User
Super User

You can do that on a Gallery.

Insert a Gallery and on the items of the Gallery put;

Sort (Datasource,NextFollowup, Ascending)


If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Not applicable

Ok, so this is actually getting me somwhere...


The problem now is that in my SharePoint list it looks like this:


The "Næste Opfølgning" is the "NextFollowup" column.
SharePoint clearly marks all the "null" values and then lists all the other dates with how many results there are.
sharepoint view.JPG
When i do your formula on my galery the list is split up into single entries like so:



Is there no way to group theese like SharePoint does?

You can do it with 2 galleries on separate screens.

Put this code in the Items property of the gallery on Screen 1.

Sort(Distinct(your_datasource_name, DateColumnName), Result, Ascending)


Then use this code on the OnSelect property of Gallery1

Navigate(Screen2, None, {locSelectedDate: ThisItem.Result});


Finally, use this code on the Items property of Gallery2 on Screen2.

Sort(your_datasource_name, Result=locSelectedDate, Ascending)


Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Not applicable

Ok so i have created a Screen2 and on it i have inserted the last piece of code to the Galery2.


Im getting an error:



The 2 other steps are giving no errors.


Only the Galery2 that is on Screen2 is giving the above error.

Not applicable

Any more suggestions to how i can first filter results by same date (as in my SharePoint list) and then show individual items?

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.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

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 (1,928)