Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Hi @MarkSL ,
Could you have tried with the filters? For example, you could use the page filters for your DayOfWeekNumber with below condition:
It will filter all data without sunday and saturday for your page.
Regards,
Daniel He
Hi @MarkSL ,
Could you have tried with the filters? For example, you could use the page filters for your DayOfWeekNumber with below condition:
It will filter all data without sunday and saturday for your page.
Regards,
Daniel He
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
97 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |