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 Platform Community / Forums / Power Apps / Sum of items in a gall...
Power Apps
Unanswered

Sum of items in a gallery shows strange, random and non-constant behavior.

(0) ShareShare
ReportReport
Posted on by 42

Hi folks!

Three weeks ago a gallery starts to have a strange and non-constant behavior:

I have a gallery which could have one or more number item.

I also have a Label Text field which have the following code:

Text(sum(detail.allitems, value(textinput5.text, "en-US")), "[$-en-US]#,###.00", "en-US")

 

I also have another gallery, wich could have one or more number item two.

And a Label Text Field with the same code as above.

 

The only difference is that the first gallery number item is negative value and the other is positive.

 

But, and here is the thing, from three weeks ago, the negative sum label field starts to show a wrong result of the sum.

Per example: if the first gallery have this number: -1,000.00 and, the second gallery have this number: 1,000.00

The Label Text field shows: -1.00 and 1,000.00

 

But that behavior is not constantly nor always. Let say, if the current user (with the above issue) delete de row and add it again, both label text fields, will show the correct value: -1,000.00 and 1,000.00

 

And it could happened also, in a different way, like: If the first gallery have the value -1.00, the label text field could show:  -100.00

 

It is weird and strange because the solution have more than a year in production.

And never show this peculiar behavior.

 

As I said, it starts three weeks ago.

 

Any idea?

 

Thanks a lot

Abdel Miranda

Categories:
  • WarrenBelz Profile Picture
    156,940 Most Valuable Professional on at

    Hi @aemiranda ,

    Try this for a start

    Text(
     Sum(
     detail.AllItems, 
     Value(TextInput5.Text)
     ), 
     "[$-en-US]#,###.00"
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

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 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard