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

#### Celebrating a New Season of Super Users with Charles Lamanna, CVP Microsoft Business Applications

February 8 was the kickoff to the 2024 Season One Super User program for Power Platform Communities, and we are thrilled to welcome back so many returning Super Users--as well as so many brand new Super Users who started their journey last fall. Our Community Super Users are the true heroes, answering questions, providing solutions, filtering spam, and so much more. The impact they make on the Communities each day is significant, and we wanted to do something special to welcome them at our first kickoff meeting of the year.   Charles Lamanna, Microsoft CVP of Business Applications, has stressed frequently how valuable our Community is to the growth and potential of Power Platform, and we are honored to share this message from him to our 2024 Season One Super Users--as well as anyone who might be interested in joining this elite group of Community members.     If you want to know more about Super Users, check out these posts for more information today:    Power Apps: What is A Super User? - Power Platform CommunityPower Automate: What is A Super User? - Power Platform Community Copilot Studio: What is A Super User? - Power Platform Community Power Pages: What is A Super User? - Power Platform Community

#### February 2024 User Group Update: Welcoming New Groups and Highlighting Upcoming Events

It's a new month and a brand-new year, which means another opportunity to celebrate our amazing User Groups!Each month, we highlight the new User Groups that have joined the community. It's been a busy season for new groups, because we are thrilled to welcome 15 New User Groups! Take a look at the list below, shared by the different community categories. If your group is listed here, give this post a kudo so we can celebrate with you!   We love our User Groups and the difference they make in the lives of our Community! Thank you to all the new User Groups, new User Group leaders--we look forward to hearing about your successes and the impact you will leave!   In addition to our monthly New User Group spotlight, it's a great time to share some of the latest events happening in our User Group community! Take a look at the list below to find one that fits your schedule and need! There's a great combination of in-person and virtual events to choose from. It's a great time of year to connect and engage with User Groups both locally and online. Please Welcome Our NEW User Groups   Power Platform: Heathcare Power Platform User Group Power Platform Connect Hub Power Platform Usergroup Denmark Mexico Norte- Power Platform User Group Pune Power User Group Sudbury Power Platform User GroupMicrosoft User Group GhanaMPPBLR - Microsoft Power Platform Bengaluru User Group Power Apps:   Myrtle Beach Power Platform User GroupAnanseTechWB PowerApps Copilot Studio: Pathfinders Power Platform Community Dynamics365: Cairo, Egypt MSD 365 Business Central/NAV/F&O User GruopMS Dynamics 365 Business Central LatamCincinnati OH D365 F&O User Group February User Group Events February 2024 Cleveland Power Platform User GroupPortallunsj - Februar 2024Indiana D365/AX February User Group MeetingQ1 2024 KC Power Platform and Dynamics 365 CRM Users Group