Forum Discussion

kirstenvo's avatar
kirstenvo
Frequent Visitor
3 years ago
Solved

DAX - SWITCH returns incorrect results

I am working with the SWITCH solution for a while now but I have noticed a problem, lines with the same DueDate and ReviewedDate still show "Overdue" as a result.   I am using the following DAX for...
  • johnt75's avatar
    3 years ago

    The reviewed date has a time part as well as a date part, so the SWITCH is comparing e.g. 9am to midnight - 9am is after midnight so it counts as overdue.

    Change the types of the columns to date, not date/time. You need to do that in Power Query as well as in Power BI desktop otherwise they will display as dates only but will still retain the date/time values.