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 / 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,195 Super User 2025 Season 2 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,195 Super User 2025 Season 2 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

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

Expiscornovus 199 Most Valuable Professional

#2
David_MA Profile Picture

David_MA 194 Super User 2025 Season 2

#3
harshdeol Profile Picture

harshdeol 167 Moderator

Last 30 days Overall leaderboard