Difference between times from different tables

Hi All,

I am hoping this is a simple and common issue that I lack the skill for and the language to search for a solution…

Business Problem:
This takes place in the nonprofit/human service sector. An employee’s shift must include 3 events in 3 separate systems:

  1. The clocking in and out of a state-sponsored system (sometimes initiated by the employee, sometimes a client/family).
  2. Clocking in and out of the companies payroll system.
  3. Documenting the services provided during the time periods above.

Each process is its own Fact table (The payroll system Fact table is not in the model yet). I need to be able to compare the start times of the systems and flag events that occur greater than 8 minutes apart. I thought this would be a simple datediff. I want to use this to replace this current table where the manager has to eyeball the difference. What am I missing?

image

Below is a screenshot of the data model.

1 Like

Hi @jguercio, we aim to consistently improve the topics being posted on the forum to help you in getting a strong solution faster. While waiting for a response, here are some tips so you can get the most out of the forum and other Enterprise DNA resources.

  • Use the forum search to discover if your query has been asked before by another member.
  • When posting a topic with formula make sure that it is correctly formatted to preformatted text </>.
    image
  • Use the proper category that best describes your topic
  • Provide as much context to a question as possible.
  • Include the masked demo pbix file, images of the entire scenario you are dealing with, screenshot of the data model, details of how you want to visualize a result, and any other supporting links and details.

I also suggest that you check the forum guideline How To Use The Enterprise DNA Support Forum. Not adhering to it may sometimes cause delay in getting an answer.

Please also check the How To Mask Sensitive Data thread for some tips on how to mask your pbix file.

Hi @jguercio, we’ve noticed that no response has been received from you since the 8th of January. We just want to check if you still need further help with this post? In case there won’t be any activity on it in the next few days, we’ll be tagging this post as Solved. If you have a follow question or concern related to this topic, please remove the Solution tag first by clicking the three dots beside Reply and then untick the checkbox. Thanks!

Thank you for reaching out. The issue is still unresolved.

I would go for combining the Date and Time fields in both fact tables to DateTime. You can then use DATEDIFF on these values with the interval argument MINUTE. Here is the concept :

timeDiff =
DATEDIFF(
FService[Start DateTime],
FLTSS[Start DateTIme],
MINUTE
)
Then filter the visuals on timeDiff, where it only shows timeDiff values > 8.

Hi @jguercio, did the response provided by @amira.bedhiafi.pro help you solve your query? If not, how far did you get and what kind of help you need further? If yes, kindly mark the thread as solved. Thanks!

1 Like

Hi @jguercio, we’ve noticed that no response has been received from you since the 16th of January. We just want to check if you still need further help with this post? In case there won’t be any activity on it in the next few days, we’ll be tagging this post as Solved. If you have a follow question or concern related to this topic, please remove the Solution tag first by clicking the three dots beside Reply and then untick the checkbox. Thanks!

A response on this post has been tagged as “Solution”. If you have a follow question or concern related to this topic, please remove the Solution tag first by clicking the three dots beside Reply and then untick the check box. Thanks!