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
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/

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/

ImkeF
Super User
Super User

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
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.