Forum Discussion
Anonymous
3 years agoNot applicable
DAX Filter Between Dates
Hi, I want to vaildate the Headcount with a salary in the Salary History table which lists all the salary changes for employees over the year and includes their Salary Change Date and Salary End...
lbendlin
3 years agoSuper User
The answer depends on your data model. Please provide more details. Here is a refactored version of your measure.
Salary Headcount =
var md = MAX(DimDates[Date])
return CALCULATE(COUNTROWS(SalaryHistory),
SalaryHistory[SALARY CHANGE DATE] <= md,
SalaryHistory[SALARY END DATE] >= md)