cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
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
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

Highlighted
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.
Highlighted
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
Check this Out

Announcing

Class of 2020- Season 2

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (10,153)