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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
amirabedhiafi
Impactful Individual
Impactful Individual

Difference between times from different source tables

Hi All,

 

Amira Bedhiafi
Full Stack Business Intelligence Consultant @Capgemini
1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @amirabedhiafi ,

 

I guess you want to be able to see this by employee/date? If so, you will need to create a single dimension table for employees that relates to both FACT-Service and FACT-LTSS as, currently, there's no common table for Power BI to use.

 

I would also combine your Date and Time fields in both fact tables to DateTime. You can then use DATEDIFF on these values with the interval argument being MINUTE. Something like this:

timeDiff =
DATEDIFF(
    FACTService[Start DateTime],
    FACTLTSS[Start DateTIme],
    MINUTE
)

 

Filter your visual on timeDiff, where it only shows timeDiff values > 8.

 

If you can provide some sample data from your model, or the model itself if there's no sensitive data in it, then I can validate the above and correct it if it doesn't work OOTB.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

1 REPLY 1
BA_Pete
Super User
Super User

Hi @amirabedhiafi ,

 

I guess you want to be able to see this by employee/date? If so, you will need to create a single dimension table for employees that relates to both FACT-Service and FACT-LTSS as, currently, there's no common table for Power BI to use.

 

I would also combine your Date and Time fields in both fact tables to DateTime. You can then use DATEDIFF on these values with the interval argument being MINUTE. Something like this:

timeDiff =
DATEDIFF(
    FACTService[Start DateTime],
    FACTLTSS[Start DateTIme],
    MINUTE
)

 

Filter your visual on timeDiff, where it only shows timeDiff values > 8.

 

If you can provide some sample data from your model, or the model itself if there's no sensitive data in it, then I can validate the above and correct it if it doesn't work OOTB.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors