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 / Filter specific report...
Power Apps
Answered

Filter specific reporting periods

(0) ShareShare
ReportReport
Posted on by 9

Hello,

 

I am pretty new to Powerapps and have been, as a side project, creating an app which allows for tracking overtime in terms of amount of hours.

The data is stored in onedrive/excel. Since I work in an Enterprise environment, this will have to make do.

 

The Data source contains the following columns:

  • Date (dd.mm.yyyy)
  • Time (hh:mm)
  • Registered by (name)
  • Amount Hours (1.0)
  • Comment field

 

The app has the following screens:

  • Gallery for navigation
  • Screen for Viewing information (form)
  • Screen for Editing (form)
  • And a screen for Data display (mostly consits of labels)

Now, I have been trying to display the amount of hours in the Data display screen for a custom date range. The reporting period is the 25th of each month. And I need to sum up the amount_hours starting from the 26th of each month until the 25th of next month. 

So I have been trying various methods and researching on the forum here to try and get what I need, but haven't had any luck thus far. 

Is someone able to point me into the right direction?

Categories:
  • v-monli-msft Profile Picture
    Microsoft Employee on at

    Hi @KennyDB,

     

    Please try with below formula in the Text property of the Label:

    DateDiff( DateValue(Date1), DateValue(Date2), Hours )

    Regards,

    Mona

  • Verified answer
    KennyDB Profile Picture
    9 on at

    Hi @v-monli-msft,

     

    Thank you for the response,

    Wouldn't that only show me the difference between 2 dates and return the value in hours(or other specified)?

    I need to return the Sum of the numbers written in the Amount_hours column.

    To elaborate:

    I can easily sum the amount of hours spent by a filtering rule:

    Sum(
     Filter(
     [datasource],
     Registered_By = ["ValueOfRegistered_By"]
     ),
     Amount_Hours
    )

    Now I only need to accomplish the same, just for the dates between 26th of the previous month untill the 25th of this month.

     

     

    Update: 

     

    OK I think I managed to find a way to get what I want, it also allows me to have more control to select the date ranges I want to report on.

     

    • I added 2 Date Pickers (Labeled as "DateFrom and DateTo respectively) as selector for From and To date
    1. The "From:" Date Picker contains the following code in the Default Property:
    DateAdd(
     DateAdd(
     Date(
     Year(Today()),
     Month(Today()),
     25
     ),
     -1,
     Months
     ),
     1,
     Days
    )

    Which essentially sets the date to 26th of the previous month.

     

         2. The "To:" Date Picker contains a simple formula to display the 25th of the current month:

    Date(
     Year(Today()),
     Month(Today()),
     25
    )

    Which looks a little like this:

    datepickers.png

     

    • Then I set a few labels (like a small table) to display what I want to see in terms of Total amount and the Filtered amount.

    Which looks like this: 

    totals.png

     

    1. Total Column: contains the formula contains the formular earlier in the post to sum the amount of hours for each row in the excel column.
    2.  The Filtered amount contains essentially the same formula as the total amount, but only contains 2 additional logical tests to allow filtering by the datepickers I added above.
    Text(
     Sum(
     Filter(
     Timesheet_1,
     Registered_By = "Kenny",
     Date > DateFrom.SelectedDate,
     Date < DateTo.SelectedDate
     ),
     Amount_Hours
     )
    )

     

    Thats it. I tested with a few entries and it works for me as expected.

    Credit also goes to the following posts which I have found later on after you have provided me with a few pointers:
    Help with "sumif" and days between dates
    and Set Default date of Date Picker to first and last day of that Month

    Thank you very much for your help, the problem is solved for me now 🙂

     

    Regards,

    Kenny

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard