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 / Go to next/previous da...
Power Apps
Answered

Go to next/previous date via an icon, then filter gallery with this date

(0) ShareShare
ReportReport
Posted on by

Hi all,

 

I'm working on a screen which shows records of a SharePoint list with a specific date. A person should be able to go to the next date (with a maximum of 2 weeks), or go to the previous date. Based on that date, the gallery is filtered showing records of only that date. 

I get stuck on how to achieve this. Could you give me some ideas on how to approach this?

 

Lvdk_1-1599491569952.png

 

Thanks in advance!

 

Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,738 Most Valuable Professional on at

    Hi @Lvdk ,

    Set a Variable at Screen OnVisible

    UpdateContext({vDateMove:0})

    Now on your back arrow

    UpdateContext({vDateMove:vDateMove-1})

    and your forward arrow

    UpdateContext({vDateMove:vDateMove+1})

    now your Filter (you will have to add whatever else you have in it)

    Filter(
     YourList,
     DateDiff(
     YourListDateField,
     YourTestDate,
     Days
     )=vDateMove
    )

     

    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.

  • WarrenBelz Profile Picture
    156,738 Most Valuable Professional on at

    Hi @Lvdk ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    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.

  • Lvdk Profile Picture
    on at

    Hi @WarrenBelz ,

     

    Yes, many thanks! I only made a small adjustment in the filtering. In stead of using the DateDiff I used the DateAdd function:

    Lvdk_0-1599723936288.png

     

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 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 320

#3
Mohsin Ali Profile Picture

Mohsin Ali 246

Last 30 days Overall leaderboard