Forum Discussion
aabati68
2 years agoFrequent Visitor
Please help with CALCULATE and FILTER dax function
I know the way I am trying to solve this is not elegant at all, but I do have a simple table called "HR Data" and a measure define like this: Headcount Employees = CALCULATE(DISTINCTCOUNT('HR Data'...
- 2 years ago
Heacount Employees One Year Before = CALCULATE(sum('HR Data'[Headcount Employees]),OFFSET(-4,allselected('HR Data'),MATCHBY('HR Data'[Index])))
lbendlin
Super User
2 years agoHeadcount Employees one year before =
CALCULATE(DISTINCTCOUNT('HR Data'[Employee Id]), SAMEPERIODLASTYEAR(Calendar[Date]))
(if you don't have a Calendar table then you should add one).