- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Return Values of another table based on Start & End
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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...

Helpful resources
User | Count |
---|---|
73 | |
70 | |
38 | |
25 | |
23 |
User | Count |
---|---|
96 | |
93 | |
50 | |
43 | |
42 |