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 / sum the sharepoint lis...
Power Apps
Answered

sum the sharepoint list exp cost column in this year and month delegation issue on created date

(0) ShareShare
ReportReport
Posted on by 107
Hi All, below is screenshot that I want to sum the exp cost column which the items in this year and month. I filter with Created date which default created by sharepoint list, normally it is working but this time show the delegation issue on created >= and created < . please help to correct. 
 
Categories:
I have the same question (0)
  • Suggested answer
    Rajkumar_M Profile Picture
    3,741 Super User 2025 Season 2 on at
     
    SharePoint does not delegate the Created >= or Created < comparison.
    So Power Apps fetches only the first 500 or 2000 records (default limit), which causes incomplete results for large lists.
    Use Text conversion to extract the year and month from Created, which can be delegated:
     
    With(
        {
            CurrentYear: Text(Today(), "[$-en-US]yyyy"),
            CurrentMonth: Text(Today(), "[$-en-US]mm")
        },
        Sum(
            Filter(
                Invoice,
                Text(Created, "[$-en-US]yyyy") = CurrentYear &&
                Text(Created, "[$-en-US]mm") = CurrentMonth
            ),
            Value(其他费用)
        )
    )
     
    Thanks!
     
    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.
     
  • Verified answer
    WarrenBelz Profile Picture
    153,051 Most Valuable Professional on at
    This is a bit of a strange one I have struck before. Created comparisons are in fact Delegable, but seem to baulk at being compared with With Variables The further issue you have is that Sum() is not Delegable. So if you do this at Screen OnVisible
    UpdateContext(
       {
          StartDate: Date(
             Year(Today()),
             Month(Today()),
             1
          ),
          EndDate: Date(
             Year(Today()),
             Month(Today()) + 1,
             1
          )
       }
    )
    and then do this
    With(
       {
          _Data:
          Filter(
             Invoice,
             Created >= StartDate,
             Created < EndDate
          )
       },
       Sum(
          _Data,
          Value(其他费用)
       )
    )
    It should produce the desired result providing there are no more than 500 (can be increased to 2,000) records between those dates.
     
    Please click Does this answer your question 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 a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn   
  • Henryzhou Profile Picture
    107 on at
    @  Thank Warren, Your solution is perfect. The Created is delegable on my other apps but this time is not. so you are totally right the SUM should not delegable after I fix the Created comparisons. Thanks so much 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

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 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard