If statement for time later than 3 PM or or (15:00)


I’ve got a time column and I’m trying to add another calculated column to see if the time is past 3:00 pm but I’m getting an error.

Here is what I have

Late = if('Route Status'[TimeC] >= TIME(15:00:00),"LATE", "Ok")



There are two ways to about this, one in DAX via a calculated column and one via Power Query which will also create a new column. I favor Power Query in these types of situations since 1) you are adding a column and 2) Power Query is much easier to work with in Dates and Times. But with that being said here are the solutions for both methods:

  1. Power Query
  • Go to your table, and click Add a Custom column and enter in this code:

    if [Time] >= #time( 15, 0,0 )

  1. In DAX

    Dax Calculated Column = if( Query1[Time] >= VALUE( TIME( 15,0,0) ), "Late","Ok")


1 Like

Perfect thanks!