Skip to main content

How to Add Up a Column in Power Apps with Sum

· 6 min read
Jagdish Kumawat
Founder @ Dewiride

Sum adds up the values of a column: Sum(Table, Column). Wrap the table in Filter to add up only some rows. With a SharePoint list, add up the rows after loading them into a variable, because SharePoint can't do the adding for Power Apps.

The example is the Overtime Timesheet app, whose My Overtime screen shows each person's total for the month.

Syntax​

Syntax
Sum(Table, NumericalFormula)
Sum(NumericalFormula1, NumericalFormula2, ...)

Step 1: Add Up a Column​

The example screen keeps the month's entries in a context variable, locEntriesMO. For November 2026 it held three entries of 4, 3 and 4 hours. I put the formula into a text control's Text for a moment, so Studio's preview strip shows the result (How to See What a Formula Returns in Power Apps Studio):

Any text control → Text
Sum(locEntriesMO, Hours)

The formula bar with Sum(locEntriesMO, Hours), the preview strip reading 11 with Data type number, and the text control on the My overtime screen showing 11

Step 2: Add Up Some Rows​

Filter first, then Sum what's left (How to Filter a Table in Power Apps with Filter). Two of the three entries were for Radiology:

Any text control → Text
Sum(Filter(locEntriesMO, Department = "Radiology"), Hours)

The formula bar with Sum(Filter(locEntriesMO, Department = "Radiology"), Hours), the preview strip reading 8 with Data type number, and the text control showing 8

When There's Nothing to Add​

In a month with no entries, locEntriesMO held no rows, and Studio's preview strip read = Blank for the screen's Sum, not 0. Wrap the Sum in Coalesce to get 0 instead (How to Replace Blank Values in Power Apps with Coalesce):

Pattern
Coalesce(Sum(Table, Column), 0)

Without it, the example screen showed Total for September 2026: hours, with no number: Fixed: Sum Returns Blank Instead of 0 for an Empty Table in Power Apps.

Sum and SharePoint​

Microsoft's reference says Sum can be delegated when used with a data source that supports delegation for these functions. SharePoint's delegation table doesn't list Sum, so Sum(SharePointList, Column) would add up only the first 500 rows Power Apps fetches, with a delegation warning.

So the example loads the rows it needs with a filter SharePoint can run, keeps them in a context variable, and adds them up there. Tables held by UpdateContext, With or Set are a static in-memory list (delegation overview), so Sum works on all of them without a warning. The loading formula: How to Filter a SharePoint List Between Two Dates in Power Apps.

How the Example Uses It​

Rejected overtime doesn't count, so the month's total leaves it out:

lblTotalMO → Text
$"Total for {Text(locMonthMO, "mmmm yyyy")}: {Text(Coalesce(Sum(Filter(locEntriesMO, Status.Value <> "Rejected"), Hours), 0), "0.00")} hours"
  • Status.Value is the text of the Status Choice column (How to Show a SharePoint Choice Column's Value in Power Apps).
  • Coalesce(…, 0) gives 0 for a month with nothing to add, including one whose only entries are rejected.
  • Text(..., "0.00") always shows two decimal places, the way payroll counts hours.

While one November entry of 3.50 hours was rejected, the screen read Total for November 2026: 7.00 hours, the two other entries. After that entry was corrected and sent again, it read 11.00.

Common Mistakes​

MistakeWhat happensDo this instead
Sum(SharePointList, Column) on a big listOnly the first 500 rows are added, with a delegation warningLoad the rows with a delegable filter, then Sum them
Adding up a gallery's AllItemsOnly the rows the gallery has loadedSum the table the gallery shows
A text column in SumText values are ignoredSum a number column, or convert with Value
Showing a Sum without CoalesceA blank total when there are no rows to addCoalesce(Sum(...), 0)

Troubleshooting​

SymptomLikely causeFix
A delegation warning on SumThe table is a SharePoint listSum a filtered copy held in a variable
The total is lower than expectedThe filter leaves out rows it shouldn'tCheck the condition, such as the exact choice text
7.5 instead of 7.50No number formatText(total, "0.00")
No number where the total should beNo rows to add, so Sum is blankCoalesce(Sum(...), 0)

FAQ​

Is there a SUMIF in Power Apps?​

Sum with Filter does the same: Sum(Filter(Table, condition), Column).

How does Excel do this?​

SUM adds a range, and SUMIFS adds the rows that match: How to Add Up a Row or Column with SUM in Excel and How to Total Hours by Person and Month in Excel with SUMIFS.

Conclusion​

Sum(Table, Column) adds a column; Sum(Filter(Table, condition), Column) adds the rows that match. For SharePoint, sum the rows after loading them with a filter SharePoint can run, and wrap the Sum in Coalesce(…, 0) when there may be nothing to add.

Additional Resources​