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 / Gallery & SharePoint L...
Power Apps
Answered

Gallery & SharePoint List - Filter & SortByColumn by specific date range doesn't work

(0) ShareShare
ReportReport
Posted on by

Hi All, 

 

I have faced the problem with sorting my gallery by specific range of dates. 

I would like to present only result from last 30 days. 

There is Share Point List as a data source with column name Date_Of_Waste, there are stored dates. 

The function i would like to use and not working yet is combination like this Date_Of_Waste<DateAdd(Today();-30;Days)


Below you can find my logic I am testing my function part by part 

Working 

 

 

Filter(SortByColumns('2020.03.12_(2019_2020YTD_Wro_Robot_Statistics)';"Date_Of_Waste";Descending);Break>1)

 

 

 

Not Working 

 

 

Filter(SortByColumns('2020.03.12_(2019_2020YTD_Wro_Robot_Statistics)';"Date_Of_Waste";Descending);Break>1;"Date_Of_Waste">DateAdd(Today();-30;Days))

 

 

 

I would by gratefully for your support 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    154,795 Most Valuable Professional on at

    Hi @koooala007 ,

    Try  - you will have to sort the mathematics 

    Filter(
     SortByColumns(
     '2020.03.12_(2019_2020YTD_Wro_Robot_Statistics)';
     "Date_Of_Waste";
     Descending
     );
     Break>1 &&
     DateDiff(
     Date_Of_Waste;
     Today();
     Days
     )>30
    )

     

    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.

  • eka24 Profile Picture
    20,923 on at

    Try:
    SortByColumns(Filter(2019_2020YTD_Wro_Robot_Statistics,DateDiff(Date_Of_Waste,Today(),Days)>=30),Date_Of_Waste)

     

    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.

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @koooala007 ,

    Could you please share a bit more about your scenario?

    Do you want to add a Date Filter criteria within your original Filter formula?

     

    Please consider modify your formula as below:

    SortByColumns(
     Filter(
     '2020.03.12_(2019_2020YTD_Wro_Robot_Statistics)';
     Break > 1;
     Date_Of_Waste > DateAdd(Today();-30;Days)
     );
     "Date_Of_Waste";
     Descending
    )

     

    Please take a try with above solution, check if the issue is solved.

     

    Best regards,

  • WarrenBelz Profile Picture
    154,795 Most Valuable Professional on at

    @koooala007 ,

    Three different approaches for you - they should all work - please tag the one best for you to continue with the thread.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 505

#2
WarrenBelz Profile Picture

WarrenBelz 502 Most Valuable Professional

#3
Haque Profile Picture

Haque 324

Last 30 days Overall leaderboard