cancel
Showing results for
Did you mean:
Helper II

## Get a grand total from multiple other sum formulas without Circular Reference

HI there,

So I am to get the grand total from three other text inputs that have formulas in them. I can just sum all three because its giving me a circular reference.

DataCardValue50_3 is the Sum of Labor

DataCardValue71_2 is the Sum of Materials

DataCardValue88_2 is the Sum of Equipment.

I would like to Sum all of these in a Total Project Amount Text Input that is on a separate screen. I feel like this should be really simple but I am getting jumbled up on how to do it.

Any help apprecriated!

1 ACCEPTED SOLUTION

Accepted Solutions
Super User

Hi @shelvia,

There are several places that you could place the variable.

Here are some options:

• OnHidden property of the screen with the subtotals; once you navigate the screen will be hidden and the total value saved in the gblTotalSum
• OnSelect property of button you use to navigate to other screen
• OnSuccess property if you submit the form before seeing the Total value

One word of caution -- you don't want to have your global variable be calulated on a screen that doesn't have the subtotals. It's fine to display the global variable on any screen; however, you must make sure that it is calculated on a screen that has all the subtotals. Otherwise, you will run into a performance issue of having to load another screen with the data to calculate a variable which is on another screen.

Best Wishes,

Matren

--------------------------------------------------------------------------------------------

Find this post helpful, give it a Thumbs Up

Solved your problem, click Accept as Solution so others can find it

5 REPLIES 5
Super User

Hi @shelvia,

Normally you would just store the sum of the datacards in a variable:

`Set(gblTotalSum, Sum(DataCardValue50_3.Text, DataCardValue71_2.Text, DataCardValue88_2.Text))`

Then display in the Text property of a label on the other screen:

`"Total Project Amount " & gblTotalSum`

If you tried this and are getting a circular reference, then please list the code for how you get each individual sum. The issue will most likely be that you are referencing the same referential data across code sets.

Let me know how it goes.

Best Wishes,

Matren

--------------------------------------------------------------------------------------------

Find this post helpful, give it a Thumbs Up

Solved your problem, click Accept as Solution so others can find it

Super User

Sum(DataCardValue50_3 .Text*1, DataCardValue71_2 .Text*1, DataCardValue88_2 .Text*1)

Helper II

@Matren Thank you for responding! Where would I put the variable itself (like where to type it)?

Super User

Hi @shelvia,

There are several places that you could place the variable.

Here are some options:

• OnHidden property of the screen with the subtotals; once you navigate the screen will be hidden and the total value saved in the gblTotalSum
• OnSelect property of button you use to navigate to other screen
• OnSuccess property if you submit the form before seeing the Total value

One word of caution -- you don't want to have your global variable be calulated on a screen that doesn't have the subtotals. It's fine to display the global variable on any screen; however, you must make sure that it is calculated on a screen that has all the subtotals. Otherwise, you will run into a performance issue of having to load another screen with the data to calculate a variable which is on another screen.

Best Wishes,

Matren

--------------------------------------------------------------------------------------------

Find this post helpful, give it a Thumbs Up

Solved your problem, click Accept as Solution so others can find it

Helper II

Perfect, Thank you so much!

Announcements

#### April 4th Copilot Studio Coffee Chat | Recording Now Available

Did you miss the Copilot Studio Coffee Chat on April 4th? This exciting and informative session with Dewain Robinson and Gary Pretty is now available to watch in our Community Galleries!   This AMA discussed how Copilot Studio is using the conversational AI-powered technology to aid and assist in the building of chatbots. Dewain is a Principal Program Manager with Copilot Studio. Gary is a Principal Program Manager with Copilot Studio and Conversational AI. Both of them had great insights to share with the community and answered some very interesting questions!     As part of our ongoing Coffee Chat AMA series, this engaging session gives the Community the unique opportunity to learn more about the latest Power Platform Copilot plans, where we’ll focus, and gain insight into upcoming features. We’re looking forward to hearing from the community at the next AMA, so hang on to your questions!   Watch the recording in the Gallery today: April 4th Copilot Studio Coffee Chat AMA