web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
Answered

SUM

(0) ShareShare
ReportReport
Posted on by 13

Hi All,

I have an 'estimate builder' power app, where users can create a new estimate or re-open a previously built estimate to modify.

 

To build an estimate, users select various items from a gallery (on selection of each of the items, it populates a collection) once all items have been added to the collection they can 'save' (patch to a sharepoint list).

The estimate collection is pretty straight forward a row per Item that shows item description, quantity and cost.  At the bottom of the page I have some totals fields i.e. total direct cost of all items in the collection.

 

This is the issue I am having - when the estimate is built from scratch, the sum formula works, but when an existing estimate is loaded the sum does not work.

The estimate collection and all fields are identical regardless of how the estimate is built, and when I review the collection table, all values are appearing in the collection, its just the sum formula does not seem to see it.

 

See screenshots for context;

 

Thanks in advance for your help.

Estimate from existing - sum not working.png
Estimate from blank - sum working.png
App home page.png
Categories:
  • Verified answer
    EddieE Profile Picture
    4,650 Moderator on at

    @JayWallace 

    Try putting your Collect() statement before your Navigate() statement.

     

    On a side note, you are using Collect() instead of ClearCollect(). So, unless at some point your Estimate collection is cleared you will end up Appending estimate data, eg

     

    User selects Estimate ID =1, Collection Estimate created, Navigates, does work

    returns to home screen

    User selects Estimate ID =2, Collection Estimate is appended to with ID=2, Navigates, user sees both estimate data together

     

    Not sure how your app is setup but just thought I'd point that out.

  • Verified answer
    JayWallace Profile Picture
    13 on at

    Thanks EddieE for your reply;

     

    Unfortunately your first suggestion did not make any difference, however your second point may have actually lead me to something.

    I have a 'Home button' down the bottom left that is the only way to get back to the start page (where the list of existing estimates are).  That code Navigates, clears the collection and resets some fields.  What I noticed though is when I then re-opened the same estimate (after navigating home) the changes did not appear to have been loaded.

    So I used the initial collect code from on 'on start' code to basically force a rebuild of the collection that powers the existing estimates.  That seems to have resolved my issues.

     

    To your point, the collection may have been getting caught with duplicates or a many:many still hang.

     

    Thanks so much mate!
    Jaut an FYI - I won't mark your answer as the solution just incase someone comes looking (as it technically wasn't the issue and I don't want to potentially not gives others the full picture).

  • EddieE Profile Picture
    4,650 Moderator on at

    @JayWallace 

    Yeah, I just wasn't sure how your app was setup and thought it may have been something like that - Good pickup!

     

    You can mark 2 answers as solutions mate, ie yours and mine. That way others can see the context they need

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 382 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard