web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter data by current...
Power Apps
Unanswered

Filter data by current week

(0) ShareShare
ReportReport
Posted on by 50

Hi,

 

I am trying to retrieve only items in my gallery by current week. I have a column [DateStart] and e column [DateEnd]. I also have a calculated column [calcWeekStart] and [calcWeekEnd] which shows the Sunday (first day of the week) in which the [DateStart] falls and shows the Saturday (last day of the week) in which the [DateEnd] falls. If either of those dates are in the current week it should show up in the gallery.

 

Filter(WorkOrders, calcWeekStart <= Today() And calcWeekEnd >= Today())

 

In a SharePoint list I use something similar to give me a view by current week. But I can't get this to work in powerapps.

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

    Hi @pketeldijk ,

    You cannot filter by SharePoint calculated columns (as you have discovered).

    I have not seen your formula, but the Weekday function in Power Apps should allow you to set Variables to test the date on.

    Happy to assist further with relevant details provided.

     

    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.

  • pketeldijk Profile Picture
    50 on at

    @WarrenBelz ,

     

    I am this far that I can get the default date of  DatePicker1 to the current Monday and DatePicker2 to the Sunday of that same week.

     

    I am using the following code in the gallery. But I must be doing something wrong because it only shows me 1 item (it should be about 15). 

     

     

    Filter(WorkOrders, StartDate <= DatePicker1.SelectedDate And EndDate >= DatePicker2.SelectedDate)

     

     

     

    If the StartDate or EndDate of a job fall in or between the current week it must display the items.

  • Verified answer
    WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at

    Hi @pketeldijk ,

    Two things, you have your greater than > and less then < the wrong way around, but you do not need date pickers - if you want Monday as the start of the week (the default is Sunday), this formula should do it for you.

    Filter(
     WorkOrders, 
     DateStart>=Today()-Weekday(Today())+2 &&
     DateEnd<=Today()+(9-Weekday(Today()))
    )

     

    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.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard