Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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 working fine:
LastCompletedMilestone =
var currentproject = selectedvalue('CI Milestones'[ProjectID0])
RETURN
CALCULATE(MAX('CI Milestones'[Title]),
'CI Milestones'[Id]=
MAXX(
FILTER(ALL('CI Milestones'),'CI Milestones'[ProjectID0]=currentproject && 'CI Milestones'[MilestoneStatus]="Completed"),
'CI Milestones'[Id])
)
This is the code I have for the upcoming milestone, which throws me an 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]=
MIN(
FILTER(ALL('CI Milestones'),'CI Milestones'[ProjectID0]=currentproject && 'CI Milestones'[MilestoneStatus]<>"Completed" && 'CI Milestones'[MilestoneStartDate]>TODAY()),
'CI Milestones'[Id])
)
I cannot figure out why this new measure has an error. Kindly assist!
Solved! Go to Solution.
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])
)
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])
)
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])
)
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 20 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 34 | |
| 31 | |
| 19 | |
| 12 | |
| 10 |