Forum Discussion
pbi1908
3 years agoHelper III
Measure doesn't recognize the date filter
Hi everyone,
I would like to calculate the DISTINCTCOUNT of the Tasks when the EndDATE was before today.
I am trying the folloing code but for some reason the filter is not working and i can't understnad why.
If i implement the filter directly in the visual i get the correct number but with the measure i am not able.
Task Count =
VAR TaskCount = DISTINCTCOUNT(Assignments[TaskId])
RETURN
EXPIRE= CALCULATE(TaskCount,Tasks[TaskFinishDate]<TODAY())
Try it like this.
TaskCount = CALCULATE(DISTINCTCOUNT(Assignments[TaskId]),Tasks[TaskFinishDate]<TODAY())Variables are not affected by CALCULATE.
1 Reply
- jdbuchanan71Super User
Try it like this.
TaskCount = CALCULATE(DISTINCTCOUNT(Assignments[TaskId]),Tasks[TaskFinishDate]<TODAY())Variables are not affected by CALCULATE.