cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
smartin Helper I
Helper I

Filter Function + Sum in a label?

Hey guys

 

I feel like I'm sooo close to figuring this out, but I still haven't cracked this nut yet. 

I have a SP list that captures the user (TM) and allow them to input the amount of time spent with their coachee. 

 

My gallery is filtered to show today's entries, and the entries by the user. 

I also want to display a label that shows a total of the time for all entries for today. 

 

I've added a label and I can add a sum function to the label but it sums the entire "time" column in the SP list. It's like a need to combine the fitler functions that sort out just the users entries for today + the sum function. 

 

Any ideas? 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
gokello Advocate V
Advocate V

Re: Filter Function + Sum in a label?

If the name of your gallery is galTimeListing, and the name of the label holding the time value is lblTimeValue 

Then use this formula in the totals label: 

Sum(galTimeListing.AllItems,lblTimeValue.Text)

 

That should give you the total for the filtered gallery

 

View solution in original post

3 REPLIES 3
gokello Advocate V
Advocate V

Re: Filter Function + Sum in a label?

If the name of your gallery is galTimeListing, and the name of the label holding the time value is lblTimeValue 

Then use this formula in the totals label: 

Sum(galTimeListing.AllItems,lblTimeValue.Text)

 

That should give you the total for the filtered gallery

 

View solution in original post

Community Support
Community Support

Re: Filter Function + Sum in a label?

Hi @smartin,

Based on the formula that you mentioned, I think there is something wrong with it.

I have made a test on my side, please take a try with the following workaround:2.JPG

Set the Text property of the Label control to following:

Sum(Gallery1.AllItems, Duration)

On your side, you should type:

"Today's Total Time: " & Sum(Gallery1.AllItems, Time) /* <- Gallery1 represents the Gallery control within your app */

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
smartin Helper I
Helper I

Re: Filter Function + Sum in a label?

Thank you for that solution! It worked great! 🙂

 

To that effect...do you know of any way (outside of a date picker) to have the gallery filtered by the current month that I'm in? So in January...it would just show January and so on as the year progresses.

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

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!

Top Solution Authors
Top Kudoed Authors
Users online (684)