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 Source to items...
Power Apps
Answered

Filter Source to items this week

(0) ShareShare
ReportReport
Posted on by 643

I have an SP list that is used for daily compliance checks. I have a label that shows the number of checks today but I cannot get the number this week to work.

 

Sum(Filter('Quality Daily Compliance', Date >= Now() - Weekday(Now(), StartOfWeek.Monday) && Date <= Now() - Weekday( Now(), StartOfWeek.Monday )+7), Hours)

 

My Today formula is this:

 

CountIf('Quality Daily Compliance',Text(Created,DateTimeFormat.ShortDate) = Text(Today(),DateTimeFormat.ShortDate)) but i could not get that to work with the week.

 

Categories:
  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @jamescosten,

    Could you please share a bit more about your need?

     

  • mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at

    hey @jamescosten 

     

    can you please try this instead:

    Sum(Filter('Quality Daily Compliance', Date >= Now() - Weekday(Now(), StartOfWeek.Monday) + 1 && Date <= Now()), Hours)

     

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

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

    Hi @jamescosten ,

    Try this

    With(
     {
     _Start: 
     Now() - Weekday(
     Now(),
     StartOfWeek.Monday
     ),
     _End: 
     Now() - Weekday(
     Now(),
     StartOfWeek.Monday
     ) + 7
     },
     With(
     {
     _Data: 
     Filter(
     'Quality Daily Compliance',
     Date >= _Start && Date <= _End
     )
     },
     Sum(
     _Data,
     Hours
     )
     )
    )

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • jamescosten Profile Picture
    643 on at

    jamescosten_0-1706610705901.png

     

  • jamescosten Profile Picture
    643 on at

    jamescosten_1-1706610755470.png

     

  • Verified answer
    mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at

    hey @jamescosten 

     

    try this instead:

    CountRows(Filter('Quality Daily Compliance', Date >= Now() - Weekday(Now(), StartOfWeek.Monday) + 1 && Date <= Now()))

     

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

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

    Hi @jamescosten ,

    I got the Hours field from your code - If Hours is a numeric field in 'Quality Daily Compliance', the code is valid (I have tested it below)  assuming you are using this somewhere requiring a number/text value - is this the case ? Test below is valid and produces the expected result when used as the Text of a Label

    WarrenBelz_0-1706616491448.png

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 312

#3
Mohsin Ali Profile Picture

Mohsin Ali 252

Last 30 days Overall leaderboard