Forum Discussion
Difference between times from different source tables
Hi All,
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
1 Reply
- BA_PeteSuper 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