Hi, I need to build a formula that sums the total of hours recorded into a label.
This label needs to show after the gallery results have been filtered using a drop down list.
The result needs to add up all hours posted to the Case File (e.g. Gadbrook Holdings)
As it stands I can get the label to add up ALL time but not to show it filtered based on user selection of the individual Case.
Any help would be very much appreciated.
List = Timesheet
Filter Button = Dropdown1
Label = Label2
Column = Hours
Solved! Go to Solution.
You can either use the same Filter expression that you have in the gallery in your sum expression:
"Total Time Recorded: " & Sum(Filter(Timesheet, <same conditions as in the gallery>), Hours)
Hope this helps!
Hi @CarlosFigueira , Thanks for reaching out.
I tried that and it returned an Invalid Argument?
"Total Time Recorded: " & Sum(Timesheet,Filter( Timesheet,Case.Value = Dropdown1.Selected.Value),Hours)
You could do something as simple as:
Label2 = Sum(Gallery2.AllItems, Hours)
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!
Hi @Delvestio ,
Based on the formula you provided, I think there is something wrong with it. I have made a test on my side, please consider modify your formula as below:
"Total Time Recorded: " & Sum( Filter(Timesheet, Case.Value = Dropdown1.Selected.Value), Hours )
In addition, you could also consider take a try with the following formula without Filter formula:
"Total Time Recorded: " & Sum( Gallery2.AllItems, Hours )
Please consider take a try with above solution, check if the issue is solved.
Check out new user group experience and if you are a leader please create your group
Did you miss the call?? Check out the Power Apps Community Call here!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.