Select value in row between specified dates in Dax

Patriek
10 augustus 2022:

In order to select a value in a row between two dates in a secondary table you can use the below DAX statement. it will find the row in _timesheetsdate between the employees StartDate and EndDate with the selected employee number.

_selectedvalue = 
VAR _timesheetsdate = 'Timesheets'[Adddate]
VAR _employeerate =
CALCULATE(
    SELECTEDVALUE('Employees'[Rate]),
    FILTER('Employees',
    _timesheetsdate >= 'Employees'[StartDate] &&
    _timesheetsdate <= 'Employees'[EndDate] &&
    Timesheets[EmployeeNumber] = Employees[Number] 
    )
)
return Timesheets[Number] * _employeerate

    I like to see who's visiting my website, do you accept?
    Do you want to accept tracking cookies?