Forum Discussion
Pbiuserr
Post Prodigy
4 years agoMeasure with dates
Hello. Trying to calculate headcount. Basically it means I am trying to count the rows for the period if the hiredate is less than the date and the termdate is greater than date OR if the termdate is...
- 4 years ago
This solved my problem:
Headcount =
CALCULATE (
COUNTROWS ( dataset ),
FILTER ( VALUES ( dataset[start] ), dataset[start] <= MAX ( 'Calendar'[Date] ) ),
FILTER (
VALUES ( dataset[term] ),
OR ( dataset[term] >= MIN ( 'Calendar'[Date] ), ISBLANK ( dataset[term] ) )
)
)