Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi, thanks in advance to anyone who can help me with the following.
I have created a report that shows data from a SharePoint weekly timesheet system. My report is fully working apart from one shortfall: If a person does not submit a timesheet for a given week the timesheet system does not generate an entry to say there is a missing timesheet.
I'm trying to get the PBI report to create an entry to flag the missing timesheet but I've been struggling with the challenge thus far.
I have a table of employees with the dates they started working for the company. And with the end dates for any people that have left the company. Everyone should submit at least one entry every week. (Even if it's just an entry to say they were on vacation).
And I have a table of entries by week. One person can submit multiple rows for the same week (i.e. one for each activity they do). But if they submit nothing (for a week when they are employed by the company) I need the report to generate a row for them. This row should have activity equal to "Missing Timesheet" and have a set number of hours assigned to it (for simplicity it could just be 7 hours per day, ideally it would be 7 hours on weekdays and 0 on weekends).
I have created a dummy pbix file with dummy data. You will notice that
Here are some screeshots from that dummy file:
Thanks again for any help or guidance.
Solved! Go to Solution.
Hi @Ptown ,
According to your description, here are my steps you can follow as a solution.
(1)First, create a calculated column [Person_leave_date1] in the [employees] table.
Person_leave_date1 =
IF(ISBLANK('Employees'[Person_leave_date]),TODAY(),'Employees'[Person_leave_date])
(2)Then create a calculated table [Table].
Table =
var _employee=SUMMARIZE('Employees','Employees'[Person_Name])
var _date=SUMMARIZE('Timesheets','Timesheets'[Week Commencing])
var _crossjoin=CROSSJOIN(_employee,_date)
return
FILTER(_crossjoin,[Week Commencing]>=MAXX(FILTER('Employees','Employees'[Person_Name]=EARLIER([Person_Name])),'Employees'[Person_start_date])&&[Week Commencing]<=MAXX(FILTER('Employees','Employees'[Person_Name]=EARLIER([Person_Name])),'Employees'[Person_leave_date1]))
(3) Then create a calculated column [Flag] in the [Table] table.
Flag =
var _date=SUMMARIZE(FILTER('Timesheets','Timesheets'[Person_Name]=EARLIER('Table'[Person_Name])),Timesheets[Week Commencing])
return
IF([Week Commencing] in _date,0,1)
(4)Then create a calculated table [Timesheets1].
Timesheets1 =
var _append= SELECTCOLUMNS(FILTER('Table','Table'[Flag]=1),"Unique_Ref","Ref-missing","Person_Name",[Person_Name],"Week Commencing",[Week Commencing],"Activity","Missing Timesheet","Monday",7,"Tuesday",7,"Wednesday",7,"Thursday",7,"Friday",7,"Saturday",0,"Sunday",0,"cc_WeekHours",35)
return
UNION('Timesheets',_append)
(5) Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello @Ptown
how did you create the report? am trying to create the same report but i can't find a way to get the data or export it from sharepoint
Hi @Ptown ,
According to your description, here are my steps you can follow as a solution.
(1)First, create a calculated column [Person_leave_date1] in the [employees] table.
Person_leave_date1 =
IF(ISBLANK('Employees'[Person_leave_date]),TODAY(),'Employees'[Person_leave_date])
(2)Then create a calculated table [Table].
Table =
var _employee=SUMMARIZE('Employees','Employees'[Person_Name])
var _date=SUMMARIZE('Timesheets','Timesheets'[Week Commencing])
var _crossjoin=CROSSJOIN(_employee,_date)
return
FILTER(_crossjoin,[Week Commencing]>=MAXX(FILTER('Employees','Employees'[Person_Name]=EARLIER([Person_Name])),'Employees'[Person_start_date])&&[Week Commencing]<=MAXX(FILTER('Employees','Employees'[Person_Name]=EARLIER([Person_Name])),'Employees'[Person_leave_date1]))
(3) Then create a calculated column [Flag] in the [Table] table.
Flag =
var _date=SUMMARIZE(FILTER('Timesheets','Timesheets'[Person_Name]=EARLIER('Table'[Person_Name])),Timesheets[Week Commencing])
return
IF([Week Commencing] in _date,0,1)
(4)Then create a calculated table [Timesheets1].
Timesheets1 =
var _append= SELECTCOLUMNS(FILTER('Table','Table'[Flag]=1),"Unique_Ref","Ref-missing","Person_Name",[Person_Name],"Week Commencing",[Week Commencing],"Activity","Missing Timesheet","Monday",7,"Tuesday",7,"Wednesday",7,"Thursday",7,"Friday",7,"Saturday",0,"Sunday",0,"cc_WeekHours",35)
return
UNION('Timesheets',_append)
(5) Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you, that is fantastic and does exactly what I need. The concept makes perfect sense & the act of transferring this to my real model will give me the opportunity to fully understand each component.
FYI In your step 4 I changed "Ref-missing" to the following:
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 66 | |
| 47 | |
| 43 | |
| 26 | |
| 19 |
| User | Count |
|---|---|
| 196 | |
| 127 | |
| 102 | |
| 67 | |
| 49 |