Forum Discussion
Ontrack DAX Expression
- 6 years ago
I added more details to my original question. I guess I was not clear enough.
I already have a column that shows status as shown in the two images. I just need to count how many task is Ontrack. I tried writing an expression based on the dates and % comp, but I guess I could have just written a new measure to count the Status of "Ontrack" tasks instead of trying to use the dates and % comp columns. Thanks
amaoa - Would need to understand the rules for On Track. But, often moving to a SWITCH(TRUE()...) statement helps clean up the logic:
Ontrack =
SWITCH(TRUE(),
TaskStartDate<TODAY() && TaskPercentComplete>0,"On Track",
TaskFinishDate>TODAY(),"On Track",
TaskStartDate>TODAY() && TaskFinishDate>TODAY(),"On Track",
"Not on track"
)I am trying to count the number of tasks in the images that are ontrack. Not sure if this will help. Below is the full expression. I left some parts out in the original post.
Ontrack = SUM(Tasks, IF....... , 1,0)))
Thanks