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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

How to join facts with facts with datetime

Hi,

 

My Fact1 and Fact2 have datetime column, I need to join fact2 datetime with fact1 datetime.

 

fact1=01/01/2020 12:14 need to join with fact 2= 01/01/2020 12:12 and 01/01/2020 12:15 

 

that means +3 or -3 mins from fact 2

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

The best way is two dimension tables One Date and One time.

Others do the cartesian of date and time and create a table join that.

time table

https://kohera.be/blog/power-bi/how-to-create-a-time-table-in-power-bi-in-a-few-simple-steps/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

The best way is two dimension tables One Date and One time.

Others do the cartesian of date and time and create a table join that.

time table

https://kohera.be/blog/power-bi/how-to-create-a-time-table-in-power-bi-in-a-few-simple-steps/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
ImkeF
Community Champion
Community Champion

Use a joint Dimension table instead.
I've never seen a model yet, where joining fact-tables that way made sense.

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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