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 / "Scope" problems using...
Power Apps
Unanswered

"Scope" problems using ThisItem inside a Filter

(0) ShareShare
ReportReport
Posted on by 47

Hi, I have a gallery which items are the 7 the days of the current week (as DateTimeValues) and a TimeSheet SharePoint List. I'm trying to show in my gallery the date and the amount of hours logged that date. Inside my gallery I have a label with this formula in the text property:

 

 

 

 

Sum(Filter(TimeSheet;Date = ThisItem.Value);Quantity)

 

 

 

 

And I'm getting the following error:

ThisItem.Value= This formula uses scope, which is not presently supported for evaluation. Data type: Date
 
If I use LookUp it works perfectly and I retrieve the first record of each date and the hours from the Quantity column, so I'm not sure if I'm doing something wrong or is some kind of Power Apps limitation...  
 

 

LookUp(TimeSheet; Date = ThisItem.Value;Quantity) ​

 

 

  Any suggestions or works around? I'm quite new with Power Apps and not sure what to do.

 

 
Best Regards
Guz
Categories:
  • Gerard Simpson Profile Picture
    2,987 Moderator on at

    Hi

     

    Try this at end of your filter instead

     

    ...).Quantity)

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Guz_90 

    What you are seeing is NOT an error.  It is just a message from the formula editor that it cannot evaluate ThisItem in a formula.  Which makes sense...what would it evaluate to?  If you have a table of 100 items in your Gallery and you tried to look at the result of ThisItem - which one would it show??  That is why the formula editor tells you this message.

    So again, not an error - perfectly normal.

     

    I hope this is helpful for you.

  • timl Profile Picture
    37,384 Super User 2026 Season 2 on at

    @Guz_90 

    Could you perhaps screenshot your error so that we can better understand the issue?
    If you see an error like the one beneath, that's a delegation warning due to Sum not being delegable. That would be one reason why your combination of LookUp/ThisItem.Value works, but Sum/Filter/ThisItem.Value doesn't work.

     

    timl_0-1637188168761.png

     

  • Guz_90 Profile Picture
    47 on at

    Hi, thanks for your answer unfortunately not is not very helpful to me.

     

    Why this work perfectly with a LookUp but not in a Filter ? Both are functions that "search" in the data source, right? (I understand the difference between the 2 functions, but I don't understand why I can retrieve one record base on "ThisItem.Value" but not a group of them)

     

    The idea is to "calculate" the total number of hours for a given date and that date is different for each element of the gallery and accesible by "ThisItem.Value". Why is it accesible from LookUp scope but not Filter ? If not an error looks to my like strange limitation.

  • Guz_90 Profile Picture
    47 on at

    Thanks for replying oddly enough despite continue showing the same error (and others) now it works. Do you know why? 

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Guz_90 

    Just to mention again - the message you are seeing is NOT an error.  It is normal for the formula editor.

    So the question is, what error are you seeing?  

    You mention that it works now, so there was no real reason why your first formula didn't work as it was valid.

    The only caution I would mention is the comparison of dates with SharePoint as they are highly dependent on the time zone information of the record.

  • timl Profile Picture
    37,384 Super User 2026 Season 2 on at

    @Guz_90 

    Just to reiterate Randy's point, if you post a screenshot of your exact error, we can better explain this behaviour.

    As I mentioned in my previous post, I suspect what you're seeing here is a delegation warning. This is not an error but a warning, due to the fact that CountRows is not delegable. This means that you won't see correct results if the number of items in your Timesheet exceeds the data row limit (500 by default, configurable up to a maximum of 2000 rows).

  • Guz_90 Profile Picture
    47 on at

    @timl  @RandyHayes 

     

    Sorry for my late response I was out of the office this days. You are totally right it was just a delegation warning I get confuse because I was seen the error symbol instead of the warning symbol because I have other errors.... errors that somehow clear themselves after I did @AmDev suggested and unfortunately I didn't take a screenshot (was something like "the requested operation is invalid. server response the query is not valid"), but now it works even with my original formula: 

     

    Sum(Filter(TimeSheet;Date = ThisItem.Value);Quantity)

     

    So, this is kind of a mystery to me.

    Anyway Thank you all for your help! 

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
Mohsin Ali Profile Picture

Mohsin Ali 225

#3
M Bilal Khan Profile Picture

M Bilal Khan 192

Last 30 days Overall leaderboard