cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MarkSL Member
Member

Report Contracted Hours split by Date

Hi all,

 

I am struggling somewhat with a data model which I have tried to simplify for this query.

 

2 DIM Tables:

 

Employees - 1 record per employee

EmployeeID - Unique ID

SiteKey - Code of where they work

Employee Name

Weekly Hours - Their contracted hours per week (eg: 40, 20 etc)

Resigned Date - The date they left the company if no longer employed.

 

Sites - 1 record per Site

SiteKey

Site - Desciption of the location

 

2 FACT tables:

 

Absence

EmployeeID

AbsenceDate

AbsenceType (Holiday or Sick)

AbsenceHours

 

Sickness

EmployeeID

SicknessDate

SicknessHours

 

So far I have related the above 4 tables and also included a Date table, joining to Absense and Sickness on Date.  I can therefore plot a chart showing Sickness and Absence by Date and also filter by Employee or Site.

 

Bits I am struggling with!

 

1, I need to report the number of hours assumed worked by Date, based on each employees WeeklyHours.  We are happy to divide their weekly hours by 5 to get a Daily Hours measure.  However this should only be reported against Monday to Fridays and ignoring Saturdays and Sundays.  As WeeklyHours are only stored in my Employee DIM table, I need to find a way to relate this with Date.  

 

2, I have added a slicer on Absence Type, so we can just look at Holidays, however dates with Sickness and no holidays remain, as Absence isn't related with Sickness.  How can I get around this?

 

3, The last issue I have spotted (for now!) is that I also need to stop an Employee's Daily Hours (point 1), from the date which they might have left the company (Resigned Date).

 

I have uploaded my simplified and non formatted pbix to Dropbox.  Any help greatly appreciated!

 

https://www.dropbox.com/s/nmdo7th669jkfpg/Report%20Contracted%20Hours%20Split%20by%20Date.pbix?dl=0

 

Mark

 

2 REPLIES 2
Community Support Team
Community Support Team

Re: Report Contracted Hours split by Date

Hi @MarkSL ,

Could you have tried with the filters? For example, you could use the page filters for your DayOfWeekNumber with below condition:

1.PNG

It will filter all data without sunday and saturday for your page.

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Community Support Team
Community Support Team

Re: Report Contracted Hours split by Date

Hi @MarkSL ,

Could you have tried with the filters? For example, you could use the page filters for your DayOfWeekNumber with below condition:

1.PNG

It will filter all data without sunday and saturday for your page.

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.