I had a very similar problem; with a little tweaking it may work for you...
In my situation we needed to show all contract details that were active for any given point in time - similar to your changing pay rates.
To do this, I did NOT create a relationship between the contracts table and date table - doing this created issues and was getting extremely complicated with the DAX UseRelationship function and constantly flipping the date relationship back and forth. I put the date filter into a Rate measure calculation. This filtered the Contract Table based on the date selected.
Rate = CALCULATE (
MAX( Contract[Rate] ),
FILTER ( Contract, Contract[end_date] >= MAX ('Date'[Date] ) ) ,
FILTER ( Contract, Contract[start_date] <= MIN ('Date'[Date] ) )
)
Similar to the solution from
@Sam DuvalWorked for me, but there may be a better way ...
(pbix example attached)
------------------------------
Bob Parsons
Business Intelligence Manager
Star Produce
------------------------------
Original Message:
Sent: Jun 01, 2022 05:37 PM
From: David Jimenez
Subject: Start and End Dates on Report
Hi Team,
I'm trying to create a PowerBi report for the Labor Costs, the problem I face is that my company has constant changes in the pay rates of the employees. I was thinking of making a log for the Pay rates for the employees with start and end dates to have the effective dates to accurately account for their actual Pay Rate that was active at the date of the hours worked.
The problem is that I don't know how to make the start and end dates communicate to the other information. Any suggestions?
------------------------------
David A. Jimenez
Business Financial Analyst
------------------------------