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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Answered

add functions

(0) ShareShare
ReportReport
Posted on by 39

Hi 

 

I have more than 10 integer variables and I need to add all of them.

 

Add(variables(name1),variables(name2)) works only for 2.

 I tried

 

add(variables('Q1'), add(variables('Q2'), add(variables('Q3'), add(variables('Q4'), add(variables('Q5'), etc....))))

 

Doesn't work.

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    creativeopinion Profile Picture
    10,508 Moderator on at

    @Jean_Jacques Could you show a screenshot of your flow? Curious if you actually need so many variables. However, the add() function only takes two parameters. 

     

    add([integer 1],[integer2])

    creativeopinion_0-1713469725175.png

    You will need to nest your add() functions within each other. 

    add(add([integer 1],[integer2]),[integer3])

     

    For more flow troubleshooting tips—check out this YT Tutorial: 5 Power Automate Troubleshooting FAQs and Helpful Tips for Creating Better Flows

     

    In this Power Automate tutorial, I explore 5 frequently asked questions that pop up when troubleshooting a flow. If you’d like to to level up your Power Automate flow skills and learn how to troubleshoot your Power Automate flow—this tutorial is for you!

     

    IN THIS VIDEO:

    ✅ How to troubleshoot a false Condition action result

    ✅ How to get dynamic content when it isn’t selectable from the list of dynamic content

    ✅ How to troubleshoot an Apply to Each action that isn’t looping through

    ✅ How to troubleshoot a skipped Apply to Each action

    ✅ How to troubleshoot a Filter Query

    ✅ How to use a SharePoint yes/no column in a Filter Query

    ✅ How to use Compose actions to troubleshoot a Power Automate flow

    ✅ How to troubleshoot multiple emails being sent

    ✅ How to troubleshoot multiple Teams messages being sent

     

    Hope this helps!

    If I helped you solve your problem—please mark my post as a solution ✅.
    Consider giving me a 👍 if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram

     

  • Verified answer
    eliotcole Profile Picture
    4,390 Moderator on at

    Hi, @Jean_Jacques , you just need to ensure that each add() only has two values in it.

     

    So your first will reference two variable, and that will be the first value in the second add(), etc.

     

     

    add(
    	add(
    		add(
    			add(
    				add(
    					add(
    						add(
    							add(
    								add(
    									variables('Q1'), 
    									variables('Q2')
    								), 
    								variables('Q3')
    							), 
    							variables('Q4')
    						), 
    						variables('Q5')
    					), 
    					variables('Q6')
    				), 
    				variables('Q7')
    			), 
    			variables('Q8')
    		), 
    		variables('Q9')
    	), 
    	variables('Q10')
    )

     

    I tested this with 10 integer variables all populated with the number 1 and it added up to 10.

  • Jean_Jacques Profile Picture
    39 on at

    thank you so much

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 605

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard