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

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

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

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

v-xida-msft
Community Support
Community Support

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.

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (3,219)