Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
mgp-opti
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
lbendlin
Super User
Super User

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

 

Anonymous
Not applicable

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors