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

October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022


Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Solution Authors
Top Kudoed Authors
Users online (2,518)