Forum Discussion

cubedweller's avatar
cubedweller
Regular Visitor
8 years ago
Solved

DAX formula for dates

I am new to DAX.

I would like to create a variable called Completed Past Due.
How would I write this logic as a DAX expression?
if (task_due_date < task_completion_date and
task_completion_date is not missing and
status = "completed")
then "Yes" else "No"

 

Thank you.

 

  • Something along the lines of =SWITCH(TRUE(), Table[task_due_date] < Table[task_completion_date] && NOT(ISBLANK(Table[task_completion_date])) && Table[status]="completed", "Yes", "No")

1 Reply

  • deldersveld's avatar
    deldersveld
    Resident Rockstar

    Something along the lines of =SWITCH(TRUE(), Table[task_due_date] < Table[task_completion_date] && NOT(ISBLANK(Table[task_completion_date])) && Table[status]="completed", "Yes", "No")