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 / How Can We Filter Cont...
Power Apps
Unanswered

How Can We Filter Contain Date

(1) ShareShare
ReportReport
Posted on by 59

Hello Everyone,

 

I have Requirement for filter next 2 week data from entity,

and also want if my start date is 13-jun and end date is 22-jun then get that record in next 2 week filter gallery

this task in high priority so please anyone help me with this.

 

 

Categories:
  • Shujaath_Khan Profile Picture
    1,111 Super User 2024 Season 1 on at

    Hi @demo099 

    can try below

     

     

    ddlfromDate.Format = "mm/dd/yyyy"
    ddltoDate.Format = "mm/dd/yyyy"
    TemplateGalleryList1.Items = Filter(taskList, fromDate>=ddlfromDate.SelectedDate && toDate <= ddltoDate.SelectedDate)

     

     

     

    And also if you want to get the data only 2 weeks data and and source should be having only date format

    you can apply the below filter on Gallery

     

    TemplateGalleryList1.Items = Filter(taskList, (fromDate>=ddlfromDate.SelectedDate && toDate <= ddltoDate.SelectedDate) && toDate <= DateAdd(Now(),14))

     

     

    shujaathkhan_0-1655205722025.png

    Thanks

    Please click Accept as Solution on this reply if it helped to solve your issue, and thumbs-up if you feel this is useful or important in other ways as a boost.

  • Dynatech123 Profile Picture
    59 on at

    Hello @Shujaath_Khan ,

    thanks for your suggestion, for next 2 week filter works properly,

    but I also want like my request "Start Date" select from current week and "End Date" select from next week

    then also show in gallery,

    So can you help me with filter that type of record in Gallery.

  • Shujaath_Khan Profile Picture
    1,111 Super User 2024 Season 1 on at

    Hi @demo099 

    as you might be aware we cannot set max and min dates to date picker but we can set the conditions in filter

    can you try below

    On screen Visible keep WeekNum in context variable

    Screen.OnVisible = UpdateContext({CurrentWeekNum: WeekNum(Now())});
    TemplateGalleryList1.Items= 
    Filter(
     taskList,
     (fromDate >= ddlfromDate.SelectedDate && toDate <= ddltoDate.SelectedDate) && toDate <= DateAdd(Now(),14) &&
     (CurrentWeekNum= WeekNum(ddlfromDate.SelectedDate) && (WeekNum(ddltoDate.SelectedDate)>CurrentWeekNum))
    )

     

    Thanks

    Please click Accept as Solution on this reply if it helped to solve your issue, and thumbs-up if you feel this is useful or important in other ways as a boost.

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard