Hi guys,

I have a problem that I am struggling to solve. I have a table which is imported through Microsoft Query and refreshes every 5 minutes. The table is a list of service calls for a company. What I need to do is find the service calls with priortiy 1 which were attended to before their dead line. Below is a small example of the table and what code Im using.

Table Name: Table_Operations_Query

CallActionNumber     Priority     ResponseDeadlineTime     StartedTime
1                              1                15:00:00                    14:30:00
2                              2                16:30:00                    12:03:00
1                              1                17:00:00                    16:00:00
=COUNTIFS(Table_Operations_Query[CallActionNumber], "1", Table_Operations_Query[Priority], "1", Table_Operations_Query[ResponseDeadlineTime], ">"& Table_Operations_Query[StartedTime])

The formula above should return the value 2 as it should pick up records which is the 1st and last one. This is a more simplied version of my table but the code doesnt seem to work and returns the incorrect values.:/

Has anyone got any ideas on how I could overcome it?