cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
smartin
Level: Powered On

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
Level 8

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
Level 8

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 Team
Community Support Team

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
Level: Powered On

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
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 (Last 30 Days)
Users online (4,961)