The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi
I have two tables
table 1 - List of contracts containing :
- Contract ID
- Employee ID
- Start Date
- End Date
Table 2 - timesheet records containing:
- Record Date
- Record ID
- Description
- Value
- Employee ID
I am having trouble linking the Contract table to the timesheet table because i can have 2 contracts for 1 employee, and this can vary by date.
How can i include in the "timesheet records" table the contract ID (as a column) based on start & end Date from table "List of Contracts"?
ex:
If i have timesheets for the month of Jan 23, and the contract ID - xx1 has a start date jan 22 and end date june 23, i need to return xx1 for all record of jan 23 )or any record that falls within this range),
if a new contract for the same employee started in july 23, i need to return for the records of july onwards the contract ID - xx2
Si if employee ID & record Date of timesheet table match employee id & Contract period ==> return contract ID for this period
Thank you for your help
what if they switch contracts mid month?
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...