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 / Filter and Sort Gallery
Power Apps
Answered

Filter and Sort Gallery

(0) ShareShare
ReportReport
Posted on by 64

Hello, I have a gallery with data (data type datetime). I have to sort the data in such a way that data at the top is descending with today + 42 days. Today is between the dates in the future and the older dates.

The problem is that I have data of the type: 30.12.2250 00:00:00 (which is simply permanent / infinite). I want to filter this data out.

Can you please help me.

regards

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,991 Moderator on at

    @Alice87 

    I don’t understand your comments about 30.12.2250 00:00:00.

     

    What date does this translate to? December, 30 2250?

     

    What data source are you using: SharePoint, Excel, SQL or CDS? What column type is the data?


    Please answer these questions.

     

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

     

     

  • Alice87 Profile Picture
    64 on at

    Hi @mdevaney 

     

    it's like membership. The exit column (datatype-datetime) shows, for example, how long you have been a member. If the date is 12/31/2250, it means that the person has a permanent membership.

    datasource-sql server

    I want to have people at the top of my gallery whose membership is about to expire. And filter out those that are unlimited.

    thank you

  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    hi @Alice87 

     

    If(
     DateValue(
     Substitute(
     Left(
     "30.12.2250 00:00:00",
     10
     ),
     ".",
     "/"
     )
     ) < Today() + 40,
     DateValue(
     Substitute(
     Left(
     "30.12.2250 00:00:00",
     10
     ),
     ".",
     "/"
     )
     )
    )

     

    Will filter out dates > 40 days from today.  You can then sort the results descending.  Just replace "30.12.2250 00:00:00" in the formula with the date column in your data 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard