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 / Incorrect results for ...
Power Automate
Answered

Incorrect results for simple multiplication expression

(0) ShareShare
ReportReport
Posted on by 4

Hello,

I am having trouble with a simple multiplication expression in my flow.

 

I have two SharePoint lists. One list has a list of properties, the other a list of tenancies in each property. Each tenancy occupies a portion of the property (e.g. Tenancy 1 = 31%, Tenancy 2 = 35%, Tenancy 3 = 34%). I am trying to update a column in the Tenancy list with a multiplication of the 'portion' attributed to each individual tenancy and an overall 'cost' for the property in the Property list. Essentially I want a column ('portion of cost') in the tenancy list to be updated with the cost attributed to each tenancy.

 

Using a Created or Modified trigger, I am able to return the list of tenancies from the Tenancy list for the property that is modified in the Property list.  However, when I try updating the items using an expression the Dynamic Content is only offering options in the Property list so I am unable to include the 'portion' column in my multiplication expression. To get around this I initialized a variable ('Outgoings Portion') and using Apply To Each after getting the items set the variable to equal the 'portion' value. This appears to set the correct value to each list item that is retrieved from the Tenancy list, however, when I use the variable in the multiplication expression it uses the first value assigned for (e.g. 31% for all items) instead of the respective portion for each.

 

I am really struggling to see what I am doing wrong. Please see screenshots below:

 

Capture1.PNG

 

Capture2.PNG

 

This multiplication expression has been inserted in the 'portion of cost' field in the Update Item function pictured above:

 

mul(variables('Outgoings Portion'),triggerBody()?['cost'])

 

Any assistance would be greatly appreciated!

 

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    v-litu-msft Profile Picture
    on at

    Hi @Adsar,

     

    Please create the Update item action into the Apply to each action after delete Apply to each 2 action and try again.Annotation 2019-11-21 103328.png

    The reason the Outgoings Portion always be the same value is the Apply to each action is loop through the values of Outgoing in the SharePoint list, it keeps setting value until it gets the value of the last item.

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Adsar Profile Picture
    4 on at

    Ahh...of course! That makes sense.

     

    I'm just starting our with Flow. I've made the changes and it's now working perfectly.

     

    Thanks so much for your assistance!

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 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard