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

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

Hi,

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.

 

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

 

Many thanks,

Marcus

6 REPLIES 6
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,

 

mgp-opti_0-1593126814432.png

 

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.

Best
D

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

 

mgp-opti_0-1593447844560.png

 

Helpful resources

Announcements
secondImage

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

secondImage

Power BI Women

Join our monthly meetings and learning sessions.

secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

secondImage

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.