Forum Discussion
Anonymous
4 years agoNot applicable
Measure to find value based on effective start date
Hi, I am trying to create a measure that looks up a value in the date with an effective start date, presuming that if there is no newer date, the value still applies. Using the table below a...
- 4 years ago
Hi,
Please check the below picture and the attached pbix file.
Salary on the day: = VAR effectivedate = MAXX ( FILTER ( Data, Data[Effective Date] <= MAX ( 'Calendar'[Date] ) ), Data[Effective Date] ) RETURN IF ( HASONEVALUE ( Data[Employer ID] ) && HASONEVALUE ( 'Calendar'[Date] ), MAXX ( FILTER ( Data, Data[Effective Date] = effectivedate ), Data[Daily Salary] ) )
Jihwan_Kim
Super User
4 years agoHi,
Please check the below picture and the attached pbix file.
Salary on the day: =
VAR effectivedate =
MAXX (
FILTER ( Data, Data[Effective Date] <= MAX ( 'Calendar'[Date] ) ),
Data[Effective Date]
)
RETURN
IF (
HASONEVALUE ( Data[Employer ID] ) && HASONEVALUE ( 'Calendar'[Date] ),
MAXX (
FILTER ( Data, Data[Effective Date] = effectivedate ),
Data[Daily Salary]
)
)
Anonymous
4 years agoNot applicable
Perfect solution - thank you!