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

#### Tuesday Tip: Getting Started with Private Messages & Macros

Welcome to TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   As our community family expands each week, we revisit our essential tools, tips, and tricks to ensure you’re well-versed in the community’s pulse. Keep an eye on the News & Announcements for your weekly Tuesday Tips—you never know what you may learn!   This Week's Tip: Private Messaging & Macros in Power Apps Community   Do you want to enhance your communication in the Community and streamline your interactions? One of the best ways to do this is to ensure you are using Private Messaging--and the ever-handy macros that are available to you as a Community member!   Our Knowledge Base article about private messaging and macros is the best place to find out more. Check it out today and discover some key tips and tricks when it comes to messages and macros:   Private Messaging: Learn how to enable private messages in your community profile and ensure you’re connected with other community membersMacros Explained: Discover the convenience of macros—prewritten text snippets that save time when posting in forums or sending private messagesCreating Macros: Follow simple steps to create your own macros for efficient communication within the Power Apps CommunityUsage Guide: Understand how to apply macros in posts and private messages, enhancing your interaction with the Community For detailed instructions and more information, visit the full page in your community today:Power Apps: Enabling Private Messaging & How to Use Macros (Power Apps)Power Automate: Enabling Private Messaging & How to Use Macros (Power Automate)  Copilot Studio: Enabling Private Messaging &How to Use Macros (Copilot Studio) Power Pages: Enabling Private Messaging & How to Use Macros (Power Pages)

#### 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