Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Calculate whether one datetime field is less than another to establish whether we get an SLA pass


My company have to respond to a service request by a certain date and time (RespondBy). Please could you let me know how I can create a column to compare the date and time we actually responded to the request (RespondActual) to RespondBy.

If RespondActual <= RespondBy we get an SLA pass, otherwise it's a fail.


25/06/2020 20:4625/06/2020 18:46
25/06/2020 20:4625/06/2020 21:46


Many thanks,


Super User III
Super User III

are you only interested in showing that flag on the individual event level, or is there an expectation for some sort of Totals?

Many thanks for your super quick response. I'm just looking to record pass or fail as individual events first off. I'll then do a count before displaying on a pass/fail visual.

in that case it is as simple as 


Pass = (SELECTEDVALUE(RespondActual) <= SELECTEDVALUE(RespondBy))


for a measure or


Pass = RespondActual <= RespondBy


for a calculated column (which would be more appropriate in your scenario)

Hi, many thanks but it hasn't worked out as expected. Probably down to me. I'm not worried about the blank cells, I'm sometimes getting False when it should be true. for example with WONUM 1071803. ACTSTART was an earlier datetime than RESPONDBY.


Many thanks,




If you work with proper datetimes, it'll be working correctly. But I see you're not working with datetimes. Instead, you're using simple strings as dates. Please use the right data type.

Frequent Visitor

Many thanks for your response Daxer.


It looks from the below that the format is datetimes but I might well be wrong! Does this look right to you? Thanks again




Helpful resources

PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

April Update

Check it Out!

Click here to read more about the April 2021 Updates!

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!


The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors