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 Platform Community / Forums / Power Automate / add multiple mul funct...
Power Automate
Unanswered

add multiple mul functions to get a grand total

(0) ShareShare
ReportReport
Posted on by 2
 
i have 7 sub totals in a mul function ==> 
 
mul(outputs('Create_item')?['body/OData__x002e__x002e__x002e_xSpaghettiB'],15)
mul(outputs('Create_item')?['body/OData__x002e__x002e__x002e_xSpaghettiv'],15)
mul(outputs('Create_item')?['body/OData__x002e__x002e__x002e_xSpaghetti4'],15)
mul(outputs('Create_item')?['body/OData__x002e__x002e__x002e_xMacaronihe'],15)
mul(outputs('Create_item')?['body/OData__x002e__x002e__x002e_xKaasschote'],20)
mul(outputs('Create_item')?['body/OData__x002e__x002e__x002e_xKinderspag'],10)
mul(outputs('Create_item')?['body/Kindermacaroni'],10)
 
 
and now i want to add the 7 mul functions with eachother so  i tried 
 
add(
mul(outputs('Create_item')?['body/OData__x002e__x002e__x002e_xSpaghettiB'],15), add(mul(outputs('Create_item')?['body/OData__x002e__x002e__x002e_xSpaghettiv'],15),add(mul(outputs('Create_item')?['body/OData__x002e__x002e__x002e_xSpaghetti4'],15),add(mul(outputs('Create_item')?['body/OData__x002e__x002e__x002e_xMacaronihe'],15),add(mul(outputs('Create_item')?['body/OData__x002e__x002e__x002e_xKaasschote'],20),add(mul(outputs('Create_item')?['body/OData__x002e__x002e__x002e_xKinderspag'],10),add(mul(outputs('Create_item')?['body/Kindermacaroni'],10))))))))
 
but this is not working.
 
In the end people who are ordering can see the total per line, but i want to give them also a grand total in the email the recieve
Categories:
I have the same question (0)
  • David_MA Profile Picture
    13,491 Super User 2026 Season 1 on at
    You don't show your flow, so it is difficult to understand how this is working. I would create a float variable and set the initial value to zero (0). You would then use seven Increment variable actions on the seven mul expressions to calculate the grand total (provided those are working). You may need to wrap each one of those into a float expression when you increment the variable. This approach helps avoid potential issues with complex nested expressions and makes the flow easier to manage and debug.

    This way, if one of the seven mul expressions fails, you will know exactly which one it is for debugging.
  • Levi Lenaers Profile Picture
    2 on at
    if you mean this ?  I get al the data from a form
     
  • David_MA Profile Picture
    13,491 Super User 2026 Season 1 on at
    Thanks for the update. Simple enough then since the expressions are not generated in an apply to each action or anything. I would then do what I suggested below and create a float variable, and then use seven increment variable actions with the seven expressions you have to generate the total. If the questions are not required, I would also suggest using a coalesce expression to return 0 if it is blank. For example: float(coalesce(items('Apply_to_each_Item')?['_f9fafdb0d76d4cc8b5217c9d23ef0a59']?['#text'], '0')).
     
    This is an example of using the increment action in an Apply to each with the above expression to generate a total:
     

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!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 86 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 55

#3
Ellis Karim Profile Picture

Ellis Karim 53 Super User 2026 Season 1

Last 30 days Overall leaderboard