Showing results for 
Search instead for 
Did you mean: 
BitLord69 Power Participant
Power Participant

BUG? Sum() function with a filter has stopped working

Does someone else have problems with the Sum-function? IT has worked well before, but today I get a blank result.


I have this formula in a text field in a gallery:


Sum(Filter('[dbo].[NyOrderRad]'; OrderhuvudId = ThisItem.Id); Antal)

If I remove the filter and just write Sum('[dbo].[NyOrderRad]'; Antal) I get a result, but not the one I want.


I use the Sum-function in a couple of places in my app, with two different fields, but none works today.

Community Support
Community Support

Re: BUG? Sum() function with a filter has stopped working

Hi @BitLord69,


If we recreate the app with other connections and use the same formula, will the issue reproduce?




Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BitLord69 Power Participant
Power Participant

Re: BUG? Sum() function with a filter has stopped working



We use an on-premises SQL DB and a gateway to connect to it; maybe it's the gateway that has gone haywire? The Sum with a Filter call inside has worked beautifully before, but I'm not 100% sure if it stopped working last Friday or in the update before that (when the ordering bug appeared, which has since then been fixed).


Ok, so I generated a standard app from just one table, and then I added some text labels with different calls - see the screenshot:




Here's what I find really strange: In label 3 I don't get any text at all. I use the &-operator to combine some static text with the result from the filtered sum call, so I expected at least the static text, but the result is nothing - isn't that super odd? In label 6 I try to use just the call to the filtered sum, but no difference.


Since I got no text whatsoever in label 3, I thought there was an error, so in label 4 I check the error message; nothing. In label 7 I have written just "Error!!!", and set it to appear only if the Errors collections contains something. I just came ot think that maybe another of the calls, in different labels, have reset the Error collection... To test this out, I deleted fields 1, 2, 5, and 6, but no difference.


I had to reload the app (since the session expired - grrrr),  and just when I loaded the app label 7 was visible for a split second. To see if I could make the error message stick, I deleted everything save labels 3, 4,  7 and the Refresh icon, see second screenshot, but no difference, label 7 was visible for a second, but no error message in label 4 at any time.




I hope this helps, I just spent way over one hour doing the app and writing this message! 


@@v-monli-msf, please get back to me if something is unclear, or if I somehow can share the app with you. Next step would be to create a completely new and fresh table just containing a number to sum up and another int field to filter on and then connect these two simples apps to it. Hopefully you can try and do that on your end.

Helpful resources

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...


New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

Top Solution Authors
Top Kudoed Authors
Users online (6,116)