Weekly Report

Hi,

I have an app for employees timesheet.

The columns are:

Date, Name, Time In, Time Out Total Hours and Total Hours Overtime.

Can you please advise how to make a weekly report send on Monday for each employee showing in attached template his name start time finish time total hours and total overtime for 7 days if is possible.

Thanks

0 3 1,020
3 REPLIES 3

Aurelien
Participant V

Hi @Mouldi_Zeghouani

Please have a look to the Behavior/Report Section in the editor.

Also, please have a look to this dedicated article:

In addition, for the 7 days requirement: this article

And this excellent post, definitely to keep in your tips & tricks toolbox:

You can have a look here : in the section " Reverse Reference with a Condition"

The condition should be, I think:

<<Start:SELECT(TimeSheet[Entry Id], (TODAY() - [Time In]) <= 7)>>
<<[name]>>
<<[start time]>>
<<[finish time]>>
<<[total hours]>>
<<[total overtime]>>
<<End>>

Another possibility, is to add condition in the generated template.
If Iโ€™m correct, you should have a Docs generated template with a table in it.
You can add this condition with the Start statement:
<<If:TODAY() - [Time In]) <= 7>> (datas....) <<EndIf>>

โ€ฆA lot of ways to achieve the same goal
Please let us know if you are having trouble at doing what you want after these tips

Cheers

Thank you for your help.
But the problem when I try to run the report it showing all the names no just for one week and the total hours a week it zero.
my goal is to make the report every week on Monday PDF separate for each employee:
Name ,Start Time ,Finish Time, Total Hours each day and Total Hours week past.
Can you please advise me how I can resolve this problem?

please find some information below.



Hi @Mouldi_Zeghouani

I think you need to try calculating the week hours sum directly in the employee table. This way, it will be easier for you to achieve your goal.
Thank to this, in the report you will be able to add a condition, something that would sound like:
โ€œif weekHoursSumForThisEmployee >0, then display informationsโ€

For your formula, I think you are close to it.

In the expression you captured, you will want to change it to embbed the Employee Name, and change your strategy in order to loop from the Employee Table.

My suggestion:

  1. You add a Virtual column in the Employee Table, to get all related time log from the last week:
    Related lastWeekLogs Expression:
FILTER(
           "Time Log",
           AND(
              [Name]=[_THISROW].[Name],
              [Date]>EOWEEK(TODAY()-7),
              [Date]<=EOWEEK(TODAY())         
           )
)
  1. You add a new Virtual Column, in your employee table, and name it SumWeekHours.
    SumWeekHours Expression:

SUM([Related lastWeekLogs][Total Hours])

In addition, please find some useful information here:

  1. Once you are done with it, we can start the next step.
    Assuming you loop your start statement on the employee table, the template expression will probably look like this:
<<Start:Employee[Name]>>
   <<[Name]>>
   <<If:[SumWeekHours]>0>>
      Total hours a week : <<[SumWeekHours]>>
      <<Start:[Related lastWeekLogs]>>
         Date:<<[Date]>>
         Time in:<<[Time in]>>
         etc....
      <<End>>
   <<Endif>>
<<End>>

In addition, documentation here:

Let us know if that works for you

EDIT : I noticed I misunderstood something and changed my post according to my new comprehension

Top Labels in this Space