cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User
Super User

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.

2 REPLIES 2
Community Support Team
Community Support Team

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?

 

Regards,

Mona

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.
Super User
Super User

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

Hi!

 

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:

 

SumError_SampleApp.png

 

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.

 

SumError_SampleApp2.png

 

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

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 181 members 4,957 guests
Please welcome our newest community members: