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

Community site session details

Session Id :
Power Apps - Power Query
Suggested answer

Sum Column

(0) ShareShare
ReportReport
Posted on by 2
Hi everybody, i have a screen with 2 date pickers. So they control a gallery who shows sharepoint list elements, i need to sum one column of that list but delimited by the selected dates in the 2 date pickers, i tried something like this:

Set(
    varTotal;
    Sum(
        Filter(
    Sales;
    
    (IsBlank(DatePicker1.SelectedDate) || 
     Fecha >= DatePicker1.SelectedDate) &&
    
    (IsBlank(DatePicker2.SelectedDate) || 
     Fecha <= DatePicker2.SelectedDate)
),
        Total
    )
);
Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    150,266 Most Valuable Professional on at
    Sum Column
    A quick follow-up to see if you received the answer you needed.

    Please 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♥.
    Visit my blog Practical Power Apps    LinkedIn   

     
  • MS.Ragavendar Profile Picture
    3,481 Super User 2025 Season 2 on at
    Sum Column
     
    Quick follow-up does the suggestion from @WarrenBelz / @MS.Ragavendar worked for you ?
     
     
     Please click Accept as solution if my post helped you solve your issue and help others who will face the similar issue in future.
    ❤️ Please consider giving it a Like, If the approach was useful in other ways.
  • WarrenBelz Profile Picture
    150,266 Most Valuable Professional on at
    Sum Column
    You need to filter your data set first to manage the Delegation issue. Bear in mind that the top filter needs to return (the list can be of any size) less than your Data Row Limit (500 - 2,000 max), for the Sum to fully work.
    With(
       {
          _Data:
          Filter(
             Sales;
             (
                IsBlank(DatePicker1.SelectedDate) || 
                Fecha >= DatePicker1.SelectedDate
             ) &&
             (
                IsBlank(DatePicker2.SelectedDate) || 
                Fecha <= DatePicker2.SelectedDate)
             )
          )
       };
       Sum(
          _Data;
          Total
       )
    )
     
    Please ✅ 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.
    Visit my blog Practical Power Apps    LinkedIn   
     
  • Suggested answer
    MS.Ragavendar Profile Picture
    3,481 Super User 2025 Season 2 on at
    Sum Column
     
    Sum with large dataset will give delegation warning, check does the solution works for you
     
     
    Power Fx
     
    "Total: " & Text(
        Sum(
            Filter(
                '5000 Sales Records',
                (IsBlank(DatePicker2.SelectedDate) || 'Order Date' >= DatePicker2.SelectedDate) &&
                (IsBlank(DatePicker2_1.SelectedDate) || 'Order Date' <= DatePicker2_1.SelectedDate)
            ),
            'Total Cost'
        ),
        "[$-en-US]#,###.00"
    )
     
     
    🏷️ Please tag me @MS.Ragavendar if you still have any queries related to the solution or issue persists.
    Please click Accept as solution if my post helped you solve your issue and help others who will face the similar issue in future.
    ❤️ Please consider giving it a Like, If the approach was useful in other ways.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 1,043 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 348 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 345

Last 30 days Overall leaderboard

Featured topics