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
Highlighted
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
Highlighted
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
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,470)