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 Platform Community / Forums / Power Automate / Math calculation based...
Power Automate
Unanswered

Math calculation based on selected excel rows

(0) ShareShare
ReportReport
Posted on by

Hi!

I need solution to made the easiest possible flow to calculate selected rows (best using ODATA to select based on part of the name of cell).

 

I'm using this method for now: https://www.youtube.com/watch?v=7sCF2pg8q5I

 

However I'm interested how to:

1. Sum 3 columns not 1 in shorter way than creating 3x tempTotal and Total.

2. Also If I won't find solution for that I want to know how to sum 3 values. Sum expression allows me to sum only two values and I would like to avoid add(add(x,x),x) because when I will need to sum 8 values It's gonna be a problem.

 

 

Thanks a lot

Categories:
I have the same question (0)
  • efialttes Profile Picture
    14,756 on at
    Re: Math calculation based on selected excel rows

    Hi


    1. Sum 3 columns not 1 in shorter way than creating 3x tempTotal and Total.

     


    You can do it by means of a Select action block, taking as input the array of filtered excel rows.

    Let's assume the columns you want to add are called Column1, Column2 Column3

    So inside the select Map Table you can keep all the columns you need as properties, and also add a new property, let's call it Addition

    Then assign to property Addition the following expression:

     

    add(add(int(item()?['Column1']),int(item()?['Column2'])),int(item()?['Column3']))

     

     

    Hope this helps

     

    Hope this helps

  • Community Power Platform Member Profile Picture
    on at
    Re: Math calculation based on selected excel rows

    You mean I need to append to the array excel values? I don't understand you. 

     

    I need to create variable (float) which is sum of all values. Can you show me example? And also editing excel isn't an option btw. Im not sure you wanted to use update a row or what. I wanted to do it in compose.

  • Community Power Platform Member Profile Picture
    on at
    Re: Math calculation based on selected excel rows

    Sorry I gave you wrong link. 

     

    Im using this way:

    https://www.youtube.com/watch?v=7sCF2pg8q5I

  • Verified answer
    efialttes Profile Picture
    14,756 on at
    Re: Math calculation based on selected excel rows

    @Anonymous 

    THis is what I was trying to explain

    Flow_Select4Addition.png

    So the Select outputs is an array ob objects (1 object per row), each object has a single Property called Addition:

    For first row, its value is 6 (1+2+3)

    For second row, its value is 12 (2+4+6)

    Please note the expression I suggested converts Column values into integer, if you store float values yuo should use this other expression instead

    add(add(float(item()?['Column1']),float(item()?['Column2'])),float(item()?['Column3']))

     

     Hope this helps

  • Community Power Platform Member Profile Picture
    on at
    Re: Math calculation based on selected excel rows

    When I done something similar it gave me wrong answers. I do add float item column x3 add variable in the loop and on the end set variable to save 1st record.

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
Tomac Profile Picture

Tomac 497 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 477 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 242

Last 30 days Overall leaderboard