cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
arnoldny91
New Member

How to use Flow to Calculate and Populate a SharePoint Field / Column

Hi Power Users, 

 

Hope you can help. I am working on using Power Automate to Update a SharePoint Item with the calculation below

 

CASH FLOW RELEASE = (Approximate Spend x ((Proposed Number of Days Credit-Current Number of Days Credit) / 365))

 

Cash Flow Release is the Column in SharePoint which needs populating and all the fields will be dynamic content from the SharePoint List.

 

Does anyone know how to use Flow Expressions to do this calculation? The syntax is confusing. I would use SharePoint Calculated Columns but they are not visible in New/Edit Modes. I essentially need Flow to do the calculation.

 

Much appreciated,


Arnold

2 ACCEPTED SOLUTIONS

Accepted Solutions
Pstork1
Dual Super User
Dual Super User

You would build a formula like the one below using the Expressions tab.  Substitute the appropriate dynamic content fields for the things in single quotes. Insert the resulting formula into a compose, a variable or directly into the update sharepoint field.

mul('Approximate Spend' ,(div(sub('Current Number of Days Credit','Proposed Number of Days Credit'),365))

Sub() subtracts the first field from the second

Div() divides the result by 365

Mul() multiplies that result times Approximate spend. 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

v-alzhan-msft
Community Support
Community Support

Hi @arnoldny91 ,

 

Please make sure all the column are Number type and you could refer to screenshot below to create the flow:

1.png

 

Expression in the Compose as below:

mul(outputs('Compose'),div(sub(outputs('Compose_2'),outputs('Compose_3')),365))

 

Best Regards,

Alice

 

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

View solution in original post

2 REPLIES 2
Pstork1
Dual Super User
Dual Super User

You would build a formula like the one below using the Expressions tab.  Substitute the appropriate dynamic content fields for the things in single quotes. Insert the resulting formula into a compose, a variable or directly into the update sharepoint field.

mul('Approximate Spend' ,(div(sub('Current Number of Days Credit','Proposed Number of Days Credit'),365))

Sub() subtracts the first field from the second

Div() divides the result by 365

Mul() multiplies that result times Approximate spend. 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
v-alzhan-msft
Community Support
Community Support

Hi @arnoldny91 ,

 

Please make sure all the column are Number type and you could refer to screenshot below to create the flow:

1.png

 

Expression in the Compose as below:

mul(outputs('Compose'),div(sub(outputs('Compose_2'),outputs('Compose_3')),365))

 

Best Regards,

Alice

 

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

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (2,937)