0

I am trying to calculate 'TimeSheet Team PV'[Time (h)] * 'Position History'[Salary]

Data model: enter image description here TimeSheet Team PV" table: enter image description here "Position History" table: enter image description here

In the Position History table, I have some employees which were promoted and appear as having different periods during different periods in the company, with different salary. Can I join somehow these values based on Start Date, End Date (Position History table) and Work Date (TimeSheet Team PV tables) + Name?

I would like to generate new column in the TimeSheet Team PV table, with the calculation above.

1 Answer 1

1

You'll need to write some logic to make sure it uses the Work Date column. Something like this:

Cost =
VAR WorkDate = 'TimeSheet Team PV'[Work Date]
RETURN
    'TimeSheet Team PV'[Time (h)]
        * CALCULATE (
            SELECTEDVALUE ( 'Position History'[Salary] ),
            'Position History'[Start Date] <= WorkDate,
            'Position History'[End Date] >= WorkDate
        )
Sign up to request clarification or add additional context in comments.

1 Comment

In that case, please accept the solution to mark it as resolved.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.