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

Community site session details

Session Id : wiQh8WqdlqnKmPet2603cc
Power Apps - Building Power Apps
Unanswered

Powerapps sort by date columt from sharepoint list

Like (0) ShareShare
ReportReport
Posted on 20 Jul 2020 20:41:01 by

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.

I have the same question (0)
  • Community Power Platform Member Profile Picture
    on 04 Aug 2020 at 13:55:59
    Re: Powerapps sort by date columt from sharepoint list

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

  • Community Power Platform Member Profile Picture
    on 20 Jul 2020 at 21:35:29
    Re: Powerapps sort by date columt from sharepoint list

    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:

    error.JPG

     

    The 2 other steps are giving no errors.

     

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

  • mdevaney Profile Picture
    29,987 Moderator on 20 Jul 2020 at 21:09:04
    Re: Powerapps sort by date columt from sharepoint list

    @Anonymous 
    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."

  • Community Power Platform Member Profile Picture
    on 20 Jul 2020 at 20:59:24
    Re: Powerapps sort by date columt from sharepoint list

    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:

    powerapps.JPG

     

    Is there no way to group theese like SharePoint does?

  • eka24 Profile Picture
    20,921 on 20 Jul 2020 at 20:50:52
    Re: Powerapps sort by date columt from sharepoint list

    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.

  • mdevaney Profile Picture
    29,987 Moderator on 20 Jul 2020 at 20:48:03
    Re: Powerapps sort by date columt from sharepoint list

    @Anonymous 
    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."

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Loading complete