Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Im trying to produce a report to track timesheet entries and chargebility etc.
I have a data source of all timesheet entries, and a dataset with information relating to each employee, charge out rate, department, role etc. Both datasets have an Employee_ID for a relationship, this is fine.
I also have the ability to change the original Employee dataset to suit my needs.
I am struggling to find a way to relate these two datasets if there is a change in roles or department or any change in the Employees dataset. See below shows a role change on the 31/07/23, therefore any timesheet entry prior to that should be as a Data Manager, and anything after should be a Surveyor. But what ever the process, it need to be able handle multiple changes to the employee dataset over time. Ie a role changes multiple times over the year, the timesheet entries still need to relate to the role they were at at the time.
Im looking for suggestions on how to handles this, best way to set up the original Employee dataset, and best way to relate the two.
Sorry first time here, cant see how to attach files?
Hi @NelsonRobinson ,
Refer to:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
Best Regards,
Neeko Tang
Hi @NelsonRobinson ,
You can use the LOOKUPVALUE() function to create a calculated column.
RoleAtTime = LOOKUPVALUE(
EmployeeHistory[Role],
EmployeeHistory[Employee_ID], Timesheet[Employee_ID]
)
DepartmentAtTime = LOOKUPVALUE(
EmployeeHistory[Department],
EmployeeHistory[Employee_ID], Timesheet[Employee_ID]
)
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
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.
See below link for example files.
https://BB.oper8cloud.com.au/invitations?share=ec490229468a75205b48
See the Example_Data.xlsx.
In the STAFF DATA you can see a change in information for Ben Dawes on the 14/7/2023, and a change for Nelson Robinson on the 24/7/2023. In my expectation sheet, you can see these changes take place on the correct dates.
Let me know if you need further clarification.
Table below showing expectation. Nelson Robinson Changed roles on 24/7/2023
TimesheetLineID | Date | StartTime | StopTime | Job | EmpoyeeID | PreferredName | LastName | EmployeeCode | JobTitle | Chargeability% | Capability | Notes |
58654354 | 21/07/2023 | 7:00:00 AM | 4:00:00 PM | Job 3 | 25910 | Nelson | ROBINSON | 1422 | SURVEYOR | 95 | SiteMap | |
58654355 | 21/07/2023 | 7:00:00 AM | 4:00:00 PM | Job 4 | 25902 | Max | SCOTT | 1461 | PLANNER | 50 | Planning | |
58654356 | 24/07/2023 | 7:00:00 AM | 4:00:00 PM | Job 1 | 27277 | Ben | DAWES | 1516 | REGIONAL MANAGER | 50 | Corperate | |
58654357 | 24/07/2023 | 7:00:00 AM | 4:00:00 PM | Job 2 | 25841 | Ash | NAIDU | 1157 | ASSISTANT | 0 | SiteMAP | |
58654358 | 24/07/2023 | 7:00:00 AM | 4:00:00 PM | Job 3 | 25910 | Nelson | ROBINSON | 1422 | DATA MANAGER | 50 | SiteDE | Nelson Robinson Changed roles here |
58654359 | 24/07/2023 | 7:00:00 AM | 4:00:00 PM | Job 4 | 25902 | Max | SCOTT | 1461 | PLANNER | 50 | Planning | |
58654360 | 25/07/2023 | 7:00:00 AM | 4:00:00 PM | Job 1 | 27277 | Ben | DAWES | 1516 | REGIONAL MANAGER | 50 | Corperate | |
58654361 | 25/07/2023 | 7:00:00 AM | 4:00:00 PM | Job 2 | 25841 | Ash | NAIDU | 1157 | ASSISTANT | 0 | SiteMAP | |
58654362 | 25/07/2023 | 7:00:00 AM | 4:00:00 PM | Job 3 | 25910 | Nelson | ROBINSON | 1422 | DATA MANAGER | 50 | SiteDE |