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 Automate / Sum of Datatable Column
Power Automate
Unanswered

Sum of Datatable Column

(0) ShareShare
ReportReport
Posted on by
Hi there,
 
I was wondering if anyone has tried the PowerFX Sum function with Datatables to sum a column in the table.
 
Without enabling PowerFX I go through the 'regular' looping method to create a running total or sum, but hoped that with PowerFX we would be able to reference the first column and just use SUM.
 
Any suggestions are appriciated
 
Ta!
Screenshot 2025-0...

Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

I have the same question (0)
  • Suggested answer
    eetuRobo Profile Picture
    4,204 Super User 2025 Season 2 on at
    To read value from datatable use =ReadCell() function.

    Example: My table


    So I will sum column1 value so like so: 3 +5 +7 +8 = 23
    First Set variable that you will sum the values to and set it to 0. 
    Then use For each loop that takes the data table and in the loop Set variable that uses the Sum (=Sum()) to read int value (Int()) CurrentItem column1 (ReadCell(CurrentItem, 1)) and the sum value to sum to itself.

    function:
    =Sum(Int(ReadCell(CurrentItem, 1)), Column1Summed)

    Like so:


    Or break it into two set variables for readability:

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 Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard