web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Label showing total ho...
Power Apps
Unanswered

Label showing total hours per week or month

(0) ShareShare
ReportReport
Posted on by 643

I have a gallery that is filtered by dropdown selection:

 

Filter('Time Sheets', Employee.Value = Dropdown2.Selected.Value)

 

I have two labels at the top of the page which needs to show Hours this week and one label showing hours this month.

 

It needs to be a sum of the hours in the current week and month.

Categories:
I have the same question (0)
  • MVP-Phipps Profile Picture
    3,521 Super User 2024 Season 1 on at

    What you need to do is get the values from the column in your filter that contain hours in the week then use the Sum() function to add them. Same scenario required for month. 

     

    Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful as can help others.

    LinkedIn: https://www.linkedin.com/in/charlie-phipps-%F0%9F%91%A8%E2%80%8D%F0%9F%92%BB-91338715b/
    YouTube: https://www.youtube.com/channel/UChmFBGU1YKIU91sNMQ7buGg
    Twitter: https://twitter.com/phipps0218

  • DBMSPA Profile Picture
    6 on at

    To minimize the amount of back and forth between your form and the datasource, I would do a ClearCollect in the OnVisible method of the screen to get a collection of all user data, and then use the collection to filter the gallery. Each label would have a nested function to total based on filter criteria like this pseudo code:

     

    Sum(Filter(Employee.Value AND (Dates for current week) ) )

    Sum(Filter(Employee.Value AND (Dates for current month) ) )

     

    Here is a tutorial on Sum function:

    PowerApps Sum function (Get sum of a column PowerApps) - SPGuides

     

    And one for getting dates in a current month that could be easily modified for the current week:

    Power Apps Filter Gallery By Dates In Current Month - Matthew Devaney

     

    Hope this helps!

    DBMSPA

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 914

#2
11manish Profile Picture

11manish 627

#3
Valantis Profile Picture

Valantis 598

Last 30 days Overall leaderboard