cancel
Showing results for
Did you mean:
Helper I

## Use previous calculation in a new calculation

How can I use the solution of a statement in the next calculation?

``````AddColumns(
TestList,
"test solved",
If(
ThisRecord.CW = 1, Solved + 2,
ThisRecord.CW = 2, (Solved+[Previous Calculation]*6)/7
)
)``````

1 ACCEPTED SOLUTION

Accepted Solutions
Community Champion

Can you provide details about your previous calculation? Did you define "previous calculation" in the same formula bar or in any other location in the app?

If you have a formula for "Previous Calculation" somewhere in the same screen, then you can use UpdateContext({varPrevCalculation: <define your logic>})

If you have a formula for "Previous Calculation" somewhere in different screen, then you can use

If you have a formula in the same formula bar where you have AddColumns function, then you can use With() function. Refer the documentation for With() : https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-with

Regards

Krishna Rachakonda

 If this reply helped you to solve the issue, please mark the post as Accepted Solution. Marking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.
Community Champion

Can you provide details about your previous calculation? Did you define "previous calculation" in the same formula bar or in any other location in the app?

If you have a formula for "Previous Calculation" somewhere in the same screen, then you can use UpdateContext({varPrevCalculation: <define your logic>})

If you have a formula for "Previous Calculation" somewhere in different screen, then you can use

If you have a formula in the same formula bar where you have AddColumns function, then you can use With() function. Refer the documentation for With() : https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-with

Regards

Krishna Rachakonda

 If this reply helped you to solve the issue, please mark the post as Accepted Solution. Marking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

Announcements

#### Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

#### Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

#### Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,001)