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 on date but wit...
Power Apps
Unanswered

Filter on date but with blanks on top

(0) ShareShare
ReportReport
Posted on by

Hi all,

 

I have been trying to wrap my head around this but I have the following sort which organises my gallery by date, which i perfect. However, I would like all records where the VehicleReturnedDate is blank to show at the very top. How can I achieve this?

 

Sort(Filter(tbl_Usage,VehicleUsed=selectedVehicle.VehicleReg),VehicleReturnedDate,Descending)
Categories:
  • mdevaney Profile Picture
    29,993 Moderator on at

    @RLangdell 

    Unforuntaely, no matter which way you sort Blanks always appear at the bottom. Therefore I hope you are OK with collections because using them is necessary to achieve your goal.  Put this code in the OnVisible property of your screen or any other behaviour based property (which starts with the word "On")

     

    ClearCollect(
    myGalleryCollection,
    Filter(tbl_Usage,
    VehicleUsed=selectedVehicle.VehicleReg,
    VehicleReturnedDate=Blank()
    )
    );
    Collect(
    myGalleryCollection,
    Sort(
    Filter(
    tbl_Usage,
    VehicleUsed=selectedVehicle.VehicleReg,
    VehicleReturnedDate<>Blank()
    ),
    VehicleReturnedDate,
    Descending
    );

     

    And then put this code in the Items property of your gallery.

     

    myGalleryCollection

     

    Let me know if you have questions.

     

    ---
    Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 190 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard