Forum Discussion
zhona9
Resolver I
3 years agoError: A function 'FILTER' has been used in a True/False expression that is used as a table filter
I am trying to get the upcoming milestone in a measure. I have a working measure for the last completed milestone that is quite similar, this is the code of the last completed milestone, which is...
- 3 years ago
I removed one of the conditions and now it works:
Upcoming Milestone = var currentproject = selectedvalue('CI Milestones'[ProjectID0]) RETURN CALCULATE(MIN('CI Milestones'[Title]), 'CI Milestones'[Id]= MINX( FILTER(ALL('CI Milestones'),'CI Milestones'[ProjectID0]=currentproject && 'CI Milestones'[MilestoneStartDate]>TODAY()), 'CI Milestones'[Id]) )
- zhona93 years ago
Resolver I
Thanks for the suggestion. However I encounter the same error. A function 'FILTER' has been used in a True/False expression that is used as a table filter expression. This is not allowed.
Upcoming Milestone = var currentproject = selectedvalue('CI Milestones'[ProjectID0]) RETURN CALCULATE(MIN('CI Milestones'[Title]), 'CI Milestones'[Id]= MINX( FILTER(ALL('CI Milestones'),'CI Milestones'[ProjectID0]=currentproject && 'CI Milestones'[MilestoneStatus]<>"Completed" && 'CI Milestones'[MilestoneStartDate]>TODAY()), 'CI Milestones'[Id]) )- zhona93 years ago
Resolver I
I removed one of the conditions and now it works:
Upcoming Milestone = var currentproject = selectedvalue('CI Milestones'[ProjectID0]) RETURN CALCULATE(MIN('CI Milestones'[Title]), 'CI Milestones'[Id]= MINX( FILTER(ALL('CI Milestones'),'CI Milestones'[ProjectID0]=currentproject && 'CI Milestones'[MilestoneStartDate]>TODAY()), 'CI Milestones'[Id]) )